<?php



namespace Mamad\Show\Providers;

use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Mamad\Comment\policies\CommentPolicy;
use Mamad\RolePermissions\Models\Permission;

class ShowServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     *
     * @return void
     */
    public function register()
    {
        //$this->loadRoutesFrom(__DIR__ . "/../routes/show_route.php");
        $this->loadViewsFrom(__DIR__."/../Resources/Views/","Show");
        $this->loadMigrationsFrom(__DIR__."/../Database/Migrations");
        $this->loadFactoriesFrom(__DIR__."/../Database/factories");

    }

    /**
     * Bootstrap services.
     *
     * @return void
     */
    public function boot()
    {
        $this->app->booted(function (){
            config()->set("AdminSidebar.show",[
                "name" => 'نمایش',
                "link" => '#',
                "icon" => "fa-paint-brush",
                "children"=>[
                    ["name"=>'تنظیمات قالب',"link"=>route("admin_theme_setting_list")],
                ],
                "permission"=>Permission::PERMISSION_SHOW_MANAGER

            ]);
        });

        /*$this->app->booted(function (){
            config()->set("AdminSidebar.slider",[
                "name" => " مدیریت اسلایدر",
                "link" => route("slider.create"),
                "icon" => "fa-map-marker",
                "children"=>[
                    ["name"=>"ایجاد اسلایدر","link"=>route("slider.create")],
                    ["name"=>"لیست اسلایدر عمومی","link"=>route('slider.index')],
                    ["name"=>" لیست اسلایدر خدمات","link"=>route("slider.service.index")],
                    ["name"=>"اسلایدر خدمات شگفت انگیز","link"=>route("slider.service_discount.index")],
                ],
                "permission"=>\Mehrab\RolePermission\Models\Permission::PERMISSION_MANAGE_SLIDER
            ]);
        });*/
    }
}
