W
W
websjunior2018-03-04 11:13:56
Laravel
websjunior, 2018-03-04 11:13:56

How to make exits button in sleeping owl?

There was a project with its own admin panel. I deleted the admin panel, but left the files for ordinary users. According to the guide from the off site, I downloaded sleeping owl. Everything is fine, but I can't log out of the admin panel. I made login requests when entering the admin panel, but I don’t know how to exit. According to the standard, I used

<a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
      Выход
</a>
 <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
           {{ csrf_field() }}
</form>

If I prescribe for sleeping owl
[
        'title' => 'Выход',
        'icon'  => 'fa fa-sign-out-alt',
        'url'  => route('logout'),
    ],

It writes out that there is no such route, and the page is not loaded.
Here is my routes/web.php
Route::get('/blog/category/{slug?}', '[email protected]')->name('category');
Route::get('/news/article/{slug?}', '[email protected]')->name('article');


//Route::group(['prefix'=>'admin', 'namespace'=>'Admin', 'middleware'=>['auth']], function(){
//    Route::get('/', '[email protected]')->name('admin.index');
//    Route::resource('/category', 'CategoryController', ['as'=>'admin']);
//    Route::resource('/article', 'ArticleController', ['as'=>'admin']);
//
//});


Route::get('/news', '[email protected]')->name('news');

Route::get('/', function () {
    return view('index');
})->name('index');

Auth::routes();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2018-03-04
@xelam

There is a demo, everything is there:
https://github.com/SleepingOwlAdmin/demo/blob/mast...
https://github.com/SleepingOwlAdmin/demo/blob/mast...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question