Skip to content

A Slim framework 3 bootstrap that is very foxy indeed

Notifications You must be signed in to change notification settings

JustSteveKing/fox

Repository files navigation

fox

A Slim framework 3 bootstrap that is very foxy indeed.

Slim Console

Available Commands:

  • php slim app:test : A simple Test Command
  • php slim app:config : List out all of your stored configuration values, for quick access
  • php slilm migration:create : Create a new Database Migration
  • php slim migration:migrate : Run the migrations
  • php slim migration:reset : Reset all Migrations
  • php slim migration:rollback : Rollback previous Migration

Migrations

Migrations are configured in phinx.php instead of the default phinx.yml to allow us to pull bootstrap configuration from our application.

Middleware Available

  • ThrottleMiddleware : Add rate limiting to routes or groups of routes, with customisable rate limits per attachment

Mailables

Mailables are a great way to send quick emails, I took inspiration from Laravel for how this is done. Thanks to Alex at CodeCourse for the amazing tutorial.

Messageables

Messageables are a great way to send SMS messages. In config/message.php be sure to set up your Twilio account details. There is one Messageable class aready built: app/Message/Welcome.php what this does is build up a template from resources/views/message/welcome.twig and prepares this from the configuration to send as a text message. The way we send it is usually from the controller, like so:

$this->message->to('+44 - UK Mobile Number minus leading 0 -')->create(new WelcomeMessage());

Please ensure that it is a UK phone number, options for sending outside the UK is in Twilio documentation.

Future Development

For future development this feature is going to be toggleable, so in you application config you can turn it on or off.

Also the Slim console will have a command to create a new Messageable.

Special Thanks

Rob Morgan for Phinx - database migrations

Hannes Forsgård for classtools - using this to load in all commands into the Slim console

Slim Framework for basically the base of what I want to achieve - thanks to all the contributers!

Questions

If you have any questions feel free to drop me a tweet @JustSteveKing

Alternatively join us on the Slim slack channel, where I am always active.

About

A Slim framework 3 bootstrap that is very foxy indeed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages