src/app/Console/Commands/PublishBackpackMiddleware.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 38-53 (lines=16) @@ | 
                                                            
                                    | 35 |  |      * | 
                                                            
                                    | 36 |  |      * @return bool|null | 
                                                            
                                    | 37 |  |      */ | 
                                                            
                                    | 38 |  |     public function handle() | 
                                                            
                                    | 39 |  |     { | 
                                                            
                                    | 40 |  |         $destination_path = $this->laravel['path'].'/Http/Middleware/CheckIfAdmin.php'; | 
                                                            
                                    | 41 |  |  | 
                                                            
                                    | 42 |  |         if ($this->files->exists($destination_path)) { | 
                                                            
                                    | 43 |  |             $this->error('CheckIfAdmin middleware already exists!'); | 
                                                            
                                    | 44 |  |  | 
                                                            
                                    | 45 |  |             return false; | 
                                                            
                                    | 46 |  |         } | 
                                                            
                                    | 47 |  |  | 
                                                            
                                    | 48 |  |         $this->makeDirectory($destination_path); | 
                                                            
                                    | 49 |  |  | 
                                                            
                                    | 50 |  |         $this->files->put($destination_path, $this->buildClass()); | 
                                                            
                                    | 51 |  |  | 
                                                            
                                    | 52 |  |         $this->info($this->laravel->getNamespace().'Http\Middleware\CheckIfAdmin.php created successfully.'); | 
                                                            
                                    | 53 |  |     } | 
                                                            
                                    | 54 |  |  | 
                                                            
                                    | 55 |  |     /** | 
                                                            
                                    | 56 |  |      * Build the class. Replace Backpack namespace with App one. | 
                                                                        
                 
                                                            
                    
src/app/Console/Commands/PublishBackpackUserModel.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 38-53 (lines=16) @@ | 
                                                            
                                    | 35 |  |      * | 
                                                            
                                    | 36 |  |      * @return bool|null | 
                                                            
                                    | 37 |  |      */ | 
                                                            
                                    | 38 |  |     public function handle() | 
                                                            
                                    | 39 |  |     { | 
                                                            
                                    | 40 |  |         $destination_path = $this->laravel['path'].'/Models/BackpackUser.php'; | 
                                                            
                                    | 41 |  |  | 
                                                            
                                    | 42 |  |         if ($this->files->exists($destination_path)) { | 
                                                            
                                    | 43 |  |             $this->error('BackpackUser model already exists!'); | 
                                                            
                                    | 44 |  |  | 
                                                            
                                    | 45 |  |             return false; | 
                                                            
                                    | 46 |  |         } | 
                                                            
                                    | 47 |  |  | 
                                                            
                                    | 48 |  |         $this->makeDirectory($destination_path); | 
                                                            
                                    | 49 |  |  | 
                                                            
                                    | 50 |  |         $this->files->put($destination_path, $this->buildClass()); | 
                                                            
                                    | 51 |  |  | 
                                                            
                                    | 52 |  |         $this->info($this->laravel->getNamespace().'Models\BackpackUser.php created successfully.'); | 
                                                            
                                    | 53 |  |     } | 
                                                            
                                    | 54 |  |  | 
                                                            
                                    | 55 |  |     /** | 
                                                            
                                    | 56 |  |      * Build the class. Replace Backpack namespace with App one. |