Nova

Extensions


Readme

Laravel Artisan allows you to run artisan tasks from Nova's command palette and open commonly used files directories quickly.

Requirements

Laravel Artisan requires a working Laravel project and artisan (obvs). The extension also assumes that laravel is at the root of your Nova project. There's currently no external dependencies as this extension simply runs shell commands.

Usage

Running Laravel Artisan commands:

  • Select the Editor → Laravel Artisan menu item; or
  • Open the command palette and type Laravel Artisan followed by the command you'd like to run. This extension supports single-fire commands like Cache clearing and also commands that need a name, like creating models and controllers. It also allows additional arguments like --seed

Currently supported commands are:

  • Cache config
  • Clear config cache
  • Clear cache
  • Forget cache
  • Seed database
  • Wipe database
  • Migrate
  • Migrate fresh
  • Migrate refresh
  • Migrate reset
  • Migrate rollback
  • Prune models
  • Create notifications migration

and all make commands

With more to come in subsequent releases.

Quickly open common directories

Need to go to a Controller and wanna use the command palette. Ok, so you type your controller name into the open quickly palette and you get a list including with a bunch of similarly named files and spend a few seconds tapping through the list to find what you what you want and find it really annoying? Oh, that doesn't annoy you? Well it annoys me, so I've added commands to list commonly accessed directories, saving you a few taps.

Currently opens:

  • Controllers
  • Middlewares
  • Providers
  • Models
  • Factories
  • Migrations
  • Seeders

I recommend mapping these to keyboard shortcuts to navigate your Laravel project even faster.

Configuration

To configure global preferences, open Extensions → Extension Library then select Laravel Artisan's Preferences tab. From here you can specify your preferred shell and enable/disable command success messages.

Contribution and feedback

I'll be adding more commands and maybe some extra functionality soon, if there's anything you'd like to see or find any bugs, feel free to open an issue on GitHub.


Changelog

Version 1.1 🗂️

NEW Open common laravel folders from the command line with Open...

Nova's open quickly can be a bit quirky at times, so skip a step and directly list and open things like models and controllers by viewing those folders directly. You can use keywords to open these directly in the command palette, but I reccomend attaching some of these to keyboard shortcuts.

Currently opens:

  • Controllers
  • Middlewares
  • Providers
  • Models
  • Factories
  • Migrations
  • Seeders

Version 1.0

Initial release 🎉


License

MIT License

Copyright (c) 2023 Ash Joseph

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.