File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,26 @@ public function boot(Router $router)
6363        $ this  ->sendUsageStats ();
6464
6565        Basset::addViewPath (realpath (__DIR__ .'/resources/views ' ));
66+ 
67+         foreach  (config ('backpack.ui.styles ' , []) as  $ style ) {
68+             if  (is_array ($ style )) {
69+                 foreach  ($ style  as  $ file ) {
70+                     Basset::map ($ file );
71+                 }
72+             } else  {
73+                 Basset::map ($ style );
74+             }
75+         }
76+ 
77+         foreach  (config ('backpack.ui.scripts ' , []) as  $ script ) {
78+             if  (is_array ($ script )) {
79+                 foreach  ($ script  as  $ file ) {
80+                     Basset::map ($ file );
81+                 }
82+             } else  {
83+                 Basset::map ($ script );
84+             }
85+         }
6686    }
6787
6888    /** 
Original file line number Diff line number Diff line change @@ -92,6 +92,26 @@ public function loadViews()
9292
9393        // Add basset view path 
9494        Basset::addViewPath ($ this  ->packageViewsPath ());
95+ 
96+         foreach  (config ($ this  ->vendorNameDotPackageName ().'.styles ' , []) as  $ path ) {
97+             if  (is_array ($ path )) {
98+                 foreach  ($ path  as  $ style ) {
99+                     Basset::map ($ style , $ style );
100+                 }
101+             } else  {
102+                 Basset::map ($ path , $ path );
103+             }
104+         }
105+ 
106+         foreach  (config ($ this  ->vendorNameDotPackageName ().'.scripts ' , []) as  $ path ) {
107+             if  (is_array ($ path )) {
108+                 foreach  ($ path  as  $ script ) {
109+                     Basset::map ($ script , $ script );
110+                 }
111+             } else  {
112+                 Basset::map ($ path , $ path );
113+             }
114+         }
95115    }
96116
97117    /** 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments