Skip to content

Commit

Permalink
refactor: [BREAKING CHANGE]: All folders moved inside src folder (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
achyutkneupane authored Dec 20, 2023
1 parent f01ad62 commit ec14218
Show file tree
Hide file tree
Showing 19 changed files with 51 additions and 118 deletions.
53 changes: 0 additions & 53 deletions artisan

This file was deleted.

17 changes: 17 additions & 0 deletions config/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@
*/
'prefix' => '',

/**
* Enable test routes
*
* If you want to disable the test routes, set this to true
*/
'enableTestRoutes' => false,

/**
* Enable logout from package
*
* With this option you can disable the logout route from the package.
* If you disable this option, you have to create your own logout route.
* Else, you will get an error until you create your own logout route.
*/
'enableLogout' => true,

/**
* Rows of the sidebar
*
Expand All @@ -81,6 +97,7 @@
* the row highlighted
*
*/

'sidebar' => [
[
'title' => 'Link1',
Expand Down
34 changes: 0 additions & 34 deletions js/bootstrap.js

This file was deleted.

23 changes: 0 additions & 23 deletions routes/web.php

This file was deleted.

16 changes: 8 additions & 8 deletions src/DashboardServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ public function boot()

$this->publishes([
__DIR__.'/../config/dashboard.php' => config_path('dashboard.php'),
__DIR__.'/../views/sidebar.blade.php' => resource_path('views/livewire/components/sidebar.blade.php'),
__DIR__.'/../views/navbar.blade.php' => resource_path('views/livewire/components/navbar.blade.php'),
__DIR__.'/../views/layout.blade.php' => resource_path('views/'.$path.'layouts/app.blade.php'),
__DIR__.'/views/sidebar.blade.php' => resource_path('views/livewire/components/sidebar.blade.php'),
__DIR__.'/views/navbar.blade.php' => resource_path('views/livewire/components/navbar.blade.php'),
__DIR__.'/views/layout.blade.php' => resource_path('views/'.$path.'layouts/app.blade.php'),

__DIR__.'/Livewire/Sidebar.php' => app_path('Livewire/Components/Sidebar.php'),
__DIR__.'/Livewire/Navbar.php' => app_path('Livewire/Components/Navbar.php'),

__DIR__.'/../sass/_variables.scss' => resource_path('sass/_variables.scss'),
__DIR__.'/../sass/app.scss' => resource_path('sass/app.scss'),
__DIR__.'/../sass/sidebar.scss' => resource_path('sass/sidebar.scss'),
__DIR__.'/sass/_variables.scss' => resource_path('sass/_variables.scss'),
__DIR__.'/sass/app.scss' => resource_path('sass/app.scss'),
__DIR__.'/sass/sidebar.scss' => resource_path('sass/sidebar.scss'),

__DIR__.'/../assets/images/sidebg.svg' => public_path('images/sidebg.svg'),
__DIR__.'/assets/images/sidebg.svg' => public_path('images/sidebg.svg'),

__DIR__.'/../stubs/' => base_path('stubs/'),
__DIR__.'/stubs/' => base_path('stubs/'),
]);
}

Expand Down
File renamed without changes
26 changes: 26 additions & 0 deletions src/routes/web.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use \Illuminate\Support\Facades\Route;

/**
* Routes for the Laravel Dashboard
*/
if(config('dashboard.enableTestRoutes')) {
Route::get('/link1', function () {
return app('view')->make('dashboard::link1');
})->name('link1');

Route::get('/sub1', function () {
return app('view')->make('dashboard::link1');
})->name('parent.sub1');
Route::get('/sub2', function () {
return app('view')->make('dashboard::link1');
})->name('parent.sub2');
}

if(config('dashboard.enableLogout')) {
Route::get('/logout', function () {
auth()->logout();
return redirect()->route('login');
})->name('logout');
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ec14218

Please sign in to comment.