change document to register new shortcode
vahidalvandi opened this issue · comments
hi , instead create new serviceProvider register shortcodes in AppServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Shortcodes\BoldShortcode;
use Shortcode;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Shortcode::register('b', BoldShortcode::class);
}
}
Yes agreed, we have lots of ways in Laravel to do a single job. But instead of putting everything in AppServiceProvider, we create a new class so that it could handle only shortcodes specific job.
Yes agreed, we have lots of ways in Laravel to do a single job. But instead of putting everything in AppServiceProvider, we create a new class so that it could handle only shortcodes specific job.
No need new Provider , when we have app service provider
Sure, I will update it.
Thank you, dear!
Thank you