subscribers and event requests
This commit is contained in:
parent
5a3110efbe
commit
104f6641d3
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\EventRequestRequest as StoreRequest;
|
||||
use App\Http\Requests\EventRequestRequest as UpdateRequest;
|
||||
|
||||
/**
|
||||
* Class EventRequestCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class EventRequestCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\EventRequest');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/eventrequest');
|
||||
$this->crud->setEntityNameStrings('eventrequest', 'event_requests');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
$this->crud->setFromDb();
|
||||
|
||||
// add asterisk for fields that are required in EventRequestRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\SubscriberRequest as StoreRequest;
|
||||
use App\Http\Requests\SubscriberRequest as UpdateRequest;
|
||||
|
||||
/**
|
||||
* Class SubscriberCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class SubscriberCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\Subscriber');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/subscriber');
|
||||
$this->crud->setEntityNameStrings('subscriber', 'subscribers');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
$this->crud->setFromDb();
|
||||
|
||||
// add asterisk for fields that are required in SubscriberRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,6 +8,11 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\AddEventRequest;
|
||||
use App\Http\Requests\SearchRequest;
|
||||
use App\Http\Requests\SubscribeRequest;
|
||||
use App\Models\EventRequest;
|
||||
use App\Models\Subscriber;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Category;
|
||||
use App\Models\Event;
|
||||
|
|
@ -42,7 +47,7 @@ class PublicController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function showEvents($cat_id = null,Request $request){
|
||||
public function showEvents($cat_id = null, Request $request){
|
||||
$date = $request->get('date');
|
||||
//$cat_id = $request->get('cat_id');
|
||||
|
||||
|
|
@ -83,8 +88,41 @@ class PublicController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function search(Request $request){
|
||||
public function search(SearchRequest $request){
|
||||
//todo implement with elastick search and scout
|
||||
$query = $request->get('q');
|
||||
return view('Bilettm.Public.SearchResult');
|
||||
$events = Event::where('title','like',"%{$query}%")->get();
|
||||
|
||||
return view('Bilettm.Public.SearchResults')
|
||||
->with([
|
||||
'events' => $events,
|
||||
'query' => $query
|
||||
]);
|
||||
}
|
||||
|
||||
public function showAddEventForm(){
|
||||
return view('Bilettm.Public.AddEventForm');
|
||||
}
|
||||
|
||||
public function postAddEvent(AddEventRequest $request){
|
||||
|
||||
$addEvent = EventRequest::create([
|
||||
'name' => $request->get('name'),
|
||||
'email' => $request->get('email'),
|
||||
'phone' => $request->get('phone'),
|
||||
'detail' => $request->get('detail')
|
||||
]);
|
||||
return view('Bilettm.Public.AddEventResult',compact('addEvent'));
|
||||
}
|
||||
|
||||
public function subscribe(SubscribeRequest $request){
|
||||
$email = $request->get('email');
|
||||
$subscribe = Subscriber::updateOrCreate(['email'=>$email,'active'=>1]);
|
||||
|
||||
if($subscribe){
|
||||
session()->flash('success','Subscription successfully');
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AddEventRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name'=>'required',
|
||||
'phone'=>'required',
|
||||
'email' =>'required|email',
|
||||
'details' => 'required'
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EventRequestRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// only allow updates if the user is logged in
|
||||
return backpack_auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
// 'name' => 'required|min:5|max:255'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation attributes that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation messages that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SearchRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'q' => 'required|min:3'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SubscribeRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SubscriberRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
// only allow updates if the user is logged in
|
||||
return backpack_auth()->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
// 'name' => 'required|min:5|max:255'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation attributes that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function attributes()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation messages that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -724,6 +724,21 @@ Route::group(
|
|||
'uses' => 'PublicController@search'
|
||||
]);
|
||||
|
||||
Route::get('/add_event',[
|
||||
'as' => 'add_event',
|
||||
'uses' => 'PublicController@showAddEventForm'
|
||||
]);
|
||||
|
||||
Route::post('/add_event',[
|
||||
'as' => 'add_event',
|
||||
'uses' => 'PublicController@postAddEvent'
|
||||
]);
|
||||
|
||||
Route::post('/subscribe',[
|
||||
'as'=>'subscription',
|
||||
'uses' =>'PublicController@subscribe'
|
||||
]);
|
||||
|
||||
Route::get('/terms_and_conditions', [
|
||||
'as' => 'termsAndConditions',
|
||||
function () {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
|
||||
class EventRequest extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'event_requests';
|
||||
// protected $primaryKey = 'id';
|
||||
// public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['name','email','phone','detail'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
}
|
||||
|
|
@ -7,7 +7,6 @@ use DB;
|
|||
|
||||
class EventStats extends \Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
use \Backpack\CRUD\CrudTrait;
|
||||
/**
|
||||
* Indicates if the model should be timestamped.
|
||||
*
|
||||
|
|
@ -71,7 +70,7 @@ class EventStats extends \Illuminate\Database\Eloquent\Model
|
|||
* Updates the sales volume earned by an event.
|
||||
*
|
||||
*/
|
||||
public function updateSalesVolume($event_id)
|
||||
public function updateSalesVolume($event_id, $amount = null)
|
||||
{
|
||||
$stats = $this->updateOrCreate([
|
||||
'event_id' => $event_id,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
|
||||
class Subscriber extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'subscribers';
|
||||
// protected $primaryKey = 'id';
|
||||
// public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['email','active'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSubscribersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('subscribers', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('email')->unique();
|
||||
$table->boolean('active')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('subscribers');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateEventRequestsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('event_requests', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->longText('details')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('event_requests');
|
||||
}
|
||||
}
|
||||
|
|
@ -6,9 +6,9 @@
|
|||
<div class="row justify-content-start g-mb-30 g-mb-0--md">
|
||||
<div class="col-12 footer-header mb-5" style="padding: 0 20%;">
|
||||
<h2>Хотите всегда быть в курсе актуальных событий?</h2>
|
||||
<form action="" class="row">
|
||||
<form action="{{route('subscribe')}}" method="POST" class="row">
|
||||
<div class="col-9 form-group">
|
||||
<input type="text" class="form-control" placeholder="Введите ваш e-mail">
|
||||
<input type="email" class="form-control" name='email' placeholder="Введите ваш e-mail">
|
||||
</div>
|
||||
<div class="col-3 form-group">
|
||||
<input type="submit" class="form-control four-button-type" value="Подписаться">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<!-- Logo -->
|
||||
<div class="navbar-brand bilettm" style="width: 30%; margin-right: 0">
|
||||
<a href="/"><img src="{{asset('assets/images/logo/bilet-logo.svg')}}"></a>
|
||||
<a href="" class="add-event">+ добавить событие</a>
|
||||
<a href="{{route('add_event')}}" class="add-event">+ добавить событие</a>
|
||||
</div>
|
||||
<!-- End Logo -->
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('add_event')}}
|
||||
<section>
|
||||
<form action="{{route('add_event')}}" method="POST">
|
||||
@csrf
|
||||
<input type="text" name="name" value="{{old('name')}}" placeholder="Name">
|
||||
<input type="email" name="email" value="{{old('email')}}" placeholder="Email">
|
||||
<input type="text" name="phone" value="{{old('phone')}}" placeholder="Phone">
|
||||
<input type="text" name="details" value="{{old('details')}}" placeholder="Details">
|
||||
<button type="submit" name="send" class="btn btn-danger"> Send</button>
|
||||
</form>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('add_event')}}
|
||||
@endsection
|
||||
|
|
@ -1,3 +1,38 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('search')}}
|
||||
<section class="movie-items-group firts-child" style="margin-bottom: 100px">
|
||||
<div class="container">
|
||||
<div class="row kinoteator tab-part">
|
||||
<div class="tab-header d-flex justify-content-between col-12">
|
||||
<h2 class="">{{$query}}</h2>
|
||||
<div style="height: 5px; margin-left: 5px; position: absolute; bottom: 0px; width: 100px; background-color: rgba(211,61,51,1)"></div>
|
||||
</div>
|
||||
<div class="tab-ozi col-12">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav u-nav-v1-1 g-mb-20" role="tablist" data-target="nav-1-1-default-hor-left" data-tabs-mobile-type="slide-up-down" data-btn-classes="btn btn-md btn-block rounded-0 u-btn-outline-lightgray g-mb-20">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" role="tab">Результатов поиска: {{$events->count()}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- End Nav tabs -->
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div class="kinoteator-tab1-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@foreach($events as $event)
|
||||
@include('Bilettm.Partials.EventItem')
|
||||
@endforeach
|
||||
<div class="col-12 no-more-results">Больше результатов нет</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Tab panes -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -23,3 +23,6 @@
|
|||
<li><a href='{{ backpack_url('page') }}'><i class='fa fa-file-o'></i> <span>Pages</span></a></li>
|
||||
<li><a href='{{ backpack_url('setting') }}'><i class='fa fa-cog'></i> <span>Settings</span></a></li>
|
||||
<li><a href='{{ backpack_url('backup') }}'><i class='fa fa-hdd-o'></i> <span>Backups</span></a></li>
|
||||
|
||||
<li><a href='{{ backpack_url('subscriber') }}'><i class='fa fa-tag'></i> <span>Subscribers</span></a></li>
|
||||
<li><a href='{{ backpack_url('event_request') }}'><i class='fa fa-tag'></i> <span>Event Requests</span></a></li>
|
||||
|
|
@ -16,4 +16,6 @@ Route::group([
|
|||
CRUD::resource('event', 'EventCrudController');
|
||||
CRUD::resource('slider', 'SliderCrudController');
|
||||
CRUD::resource('tag', 'TagCrudController');
|
||||
CRUD::resource('subscriber', 'SubscriberCrudController');
|
||||
CRUD::resource('event_request', 'EventRequestCrudController');
|
||||
}); // this should be the absolute last line of this file
|
||||
|
|
@ -18,4 +18,14 @@ Breadcrumbs::for('category', function ($trail,$category){
|
|||
Breadcrumbs::for('event',function($trail, $event){
|
||||
$trail->parent('category', $event->category);
|
||||
$trail->push($event->title,$event->event_url);
|
||||
});
|
||||
|
||||
Breadcrumbs::for('search',function($trail){
|
||||
$trail->parent('home');
|
||||
$trail->push('Результат поиска');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('add_event',function($trail){
|
||||
$trail->parent('home');
|
||||
$trail->push('+ ДОБАВИТЬ СОБЫТИЕ');
|
||||
});
|
||||
Loading…
Reference in New Issue