Code Monkey home page Code Monkey logo

cakephp-niceadminbakescripts's Introduction

Hi there ๐Ÿ‘‹

My name is David or Dave (he/him) and I work as a Senior Software Engineer

I work with PHP and Typescript. Along with an array of frameworks!

  • ๐ŸŽฎ Avid gamer
  • ๐Ÿšถโ€โ™‚๏ธI like to hike
  • ๐Ÿบ IPA drinker
  • ๐Ÿˆ My cat is called Zeus

cakephp-niceadminbakescripts's People

Contributors

davidyell avatar ogrrd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cakephp-niceadminbakescripts's Issues

3.x version

It would be worth creating a version of the bake script for the 3.x version of the framework. Especially as by default it bakes using the paginate() shortcut method in the controller which is a bit dirty imho.

Templae bake

In
src/Template/Bake/Element/Controller/index.ctp

Correct is:
$this->set('<%= $pluralName %>', $this->paginate($query, [
'order' => [$this-><%= $currentModelName %>->aliasField('modified') => 'desc']
]));
Your code are withiut ].
Thank you.

Create an install shell

I wonder if the plugin can have an install shell, or script in composer which automatically symlinks the stylesheets?

$ bin/cake plugin assets symlink NiceAdminBakeTheme

Include timezone in datetime outputs

When outputting a datetime string it should be customised to the timezone and locale.

$entity->get('modified')->nice('Europe/London', 'en_GB');
$entity->get('modified')->timeAgoInWords(['timezone' => 'Europe/London']);

Views detect field type

Allow views to detect field type and automatically use the Boolean helper.

$this->Boolean->display($data['Model']['field'])

Behaviour detection

Make views aware of Behaviours such as SoftDelete to make button display conditional.

As I have purge and deleted buttons, it makes sense that they should not be included if the SoftDelete behaviour isn't attached to the model. Could also be removed if the Utils plugin isn't installed at all.

Table 'dbpo.examples' doesn't exist

Where is sql our how to I create a table db.examples ?

bin/cake bake template --theme=NiceAdminBakeTheme Examples
Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table **'db.examples' doesn't exist** in [/www/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 131]

bin/cake bake template --theme=NiceAdminBakeTheme --prefix=Admin Examples
Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table **'db.examples' doesn't exist** in [/www/app/vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 131]

Missing ]

Thank you for your plugin. Very good.

Missing ] continue

See:
bin/cake bake controller --theme=NiceAdminBakeTheme Customers

Baking controller class for Customers...

Creating file /backup/www/cake/cake3theme/src/Controller/CustomersController.php
Wrote /backup/www/cake/cake3theme/src/Controller/CustomersController.php
Exception: syntax error, unexpected ')', expecting ']' in [/backup/www/cake/cake3theme/src/Controller/CustomersController.php, line 25]
2019-06-07 16:32:04 Error: [ParseError] syntax error, unexpected ')', expecting ']' in /backup/www/cake/cake3theme/src/Controller/CustomersController.php on line 25

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.