| 1 |  |  | <?php namespace Arcanesoft\Foundation\Seeds; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | use Arcanesoft\Auth\Seeds\PermissionsSeeder; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * Class     PermissionTableSeeder | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * @package  Arcanesoft\Foundation\Seeds | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * @author   ARCANEDEV <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | class PermissionsTableSeeder extends PermissionsSeeder | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |     /* ------------------------------------------------------------------------------------------------ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |      |  Main Functions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |      | ------------------------------------------------------------------------------------------------ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |      * Run the database seeds. | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 19 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 20 |  |  |     public function run() | 
            
                                                                        
                            
            
                                    
            
            
                | 21 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 22 |  |  |         $this->seed([ | 
            
                                                                        
                            
            
                                    
            
            
                | 23 |  |  |             [ | 
            
                                                                        
                            
            
                                    
            
            
                | 24 |  |  |                 'group'       => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 25 |  |  |                     'name'        => 'Foundation', | 
            
                                                                        
                            
            
                                    
            
            
                | 26 |  |  |                     'slug'        => 'foundation', | 
            
                                                                        
                            
            
                                    
            
            
                | 27 |  |  |                     'description' => 'Foundation permissions group', | 
            
                                                                        
                            
            
                                    
            
            
                | 28 |  |  |                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 29 |  |  |                 'permissions' => array_merge( | 
            
                                                                        
                            
            
                                    
            
            
                | 30 |  |  |                     $this->getLogViewerSeeds() | 
            
                                                                        
                            
            
                                    
            
            
                | 31 |  |  |                 ), | 
            
                                                                        
                            
            
                                    
            
            
                | 32 |  |  |             ], | 
            
                                                                        
                            
            
                                    
            
            
                | 33 |  |  |         ]); | 
            
                                                                        
                            
            
                                    
            
            
                | 34 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |     /* ------------------------------------------------------------------------------------------------ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |      |  Other Functions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |      | ------------------------------------------------------------------------------------------------ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |      * Get the LogViewer permissions. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |      * @return array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |     private function getLogViewerSeeds() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |         return [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |             [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |                 'name'        => 'LogViewer - View dashboard', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |                 'description' => 'Allow to view the LogViewer dashboard.', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |                 'slug'        => 'foundation.logviewer.dashboard', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |             ],[ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |                 'name'        => 'LogViewer - List all logs', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |                 'description' => 'Allow to list all the logs.', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |                 'slug'        => 'foundation.logviewer.list', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |             ],[ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |                 'name'        => 'LogViewer - View a log', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |                 'description' => 'Allow to display a log.', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |                 'slug'        => 'foundation.logviewer.show', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |             ],[ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |                 'name'        => 'LogViewer - Download a log', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |                 'description' => 'Allow to download a log.', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |                 'slug'        => 'foundation.logviewer.download', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |             ],[ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |                 'name'        => 'LogViewer - Delete a log', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |                 'description' => 'Allow to delete a log.', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |                 'slug'        => 'foundation.logviewer.delete', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |             ] | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 71 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 72 |  |  |  |