-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding more features: seo pages & footers
- Loading branch information
1 parent
02e9e67
commit 9b3fc36
Showing
43 changed files
with
2,121 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
44 changes: 44 additions & 0 deletions
44
database/migrations/2017_00_01_000001_create_seo_pages_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
use Arcanesoft\Seo\Bases\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
|
||
/** | ||
* Class CreateSeoPagesTable | ||
* | ||
* @author ARCANEDEV <arcanedev.maroc@gmail.com> | ||
*/ | ||
class CreateSeoPagesTable extends Migration | ||
{ | ||
/* ------------------------------------------------------------------------------------------------ | ||
| Constructor | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
/** | ||
* CreateSeoPagesTable constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->setTable('pages'); | ||
} | ||
|
||
/* ------------------------------------------------------------------------------------------------ | ||
| Main Functions | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up() | ||
{ | ||
$this->createSchema(function(Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('name', 255); | ||
$table->text('content'); | ||
$table->string('locale')->default(config('app.locale')); | ||
$table->timestamps(); | ||
}); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
database/migrations/2017_00_01_000002_create_seo_footers_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
use Arcanesoft\Seo\Bases\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
|
||
/** | ||
* Class CreateSeoFootersTable | ||
* | ||
* @author ARCANEDEV <arcanedev.maroc@gmail.com> | ||
*/ | ||
class CreateSeoFootersTable extends Migration | ||
{ | ||
/* ------------------------------------------------------------------------------------------------ | ||
| Constructor | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
/** | ||
* CreateSeoFootersTable constructor. | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->setTable('footers'); | ||
} | ||
|
||
/* ------------------------------------------------------------------------------------------------ | ||
| Main Functions | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function up() | ||
{ | ||
$this->createSchema(function(Blueprint $table) { | ||
$table->increments('id'); | ||
$table->integer('page_id')->default(0); | ||
$table->string('name'); | ||
$table->string('localization'); | ||
$table->string('uri'); | ||
$table->string('locale')->default(config('app.locale')); | ||
$table->timestamps(); | ||
|
||
$table->unique(['uri', 'locale']); | ||
}); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
return [ | ||
'en' => 'English', | ||
'fr' => 'French', | ||
]; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
return [ | ||
'en' => 'Anglais', | ||
'fr' => 'Français', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
@section('header') | ||
<h1>SEO <small>New Footer</small></h1> | ||
@endsection | ||
|
||
@section('content') | ||
{{ Form::open(['route' => 'admin::seo.footers.store', 'method' => 'POST', 'class' => 'form form-loading']) }} | ||
<div class="box"> | ||
<div class="box-header with-border"> | ||
<h2 class="box-title">New Footer</h2> | ||
</div> | ||
<div class="box-body"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="form-group {{ $errors->first('name', 'has-error') }}"> | ||
{{ Form::label('name', 'Name :') }} | ||
{{ Form::text('name', old('name'), ['class' => 'form-control']) }} | ||
@if ($errors->has('name')) | ||
<span class="text-red">{!! $errors->first('name') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="form-group {{ $errors->first('localization', 'has-error') }}"> | ||
{{ Form::label('localization', 'Localization :') }} | ||
{{ Form::text('localization', old('localization'), ['class' => 'form-control']) }} | ||
@if ($errors->has('localization')) | ||
<span class="text-red">{!! $errors->first('localization') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="clearfix visible-md visible-lg"></div> | ||
|
||
<div class="col-md-6"> | ||
<div class="form-group {{ $errors->first('uri', 'has-error') }}"> | ||
{{ Form::label('uri', 'URI :') }} | ||
{{ Form::text('uri', old('uri'), ['class' => 'form-control']) }} | ||
@if ($errors->has('uri')) | ||
<span class="text-red">{!! $errors->first('uri') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="cleafix visible-sm"></div> | ||
|
||
<div class="col-sm-6 col-md-3"> | ||
<div class="form-group {{ $errors->first('locale', 'has-error') }}"> | ||
{{ Form::label('locale', 'Locale :') }} | ||
{{ Form::select('locale', $locales, old('locale', config('app.locale')), ['class' => 'select-2-fw']) }} | ||
@if ($errors->has('locale')) | ||
<span class="text-red">{!! $errors->first('locale') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-6 col-md-3"> | ||
<div class="form-group {{ $errors->first('page', 'has-error') }}"> | ||
{{ Form::label('page', 'Page :') }} | ||
{{ Form::select('page', $pages, old('page', 0), ['class' => 'select-2-fw']) }} | ||
@if ($errors->has('page')) | ||
<span class="text-red">{!! $errors->first('page') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="clearfix visible-sm visible-md visible-lg"></div> | ||
|
||
<div class="col-md-12"> | ||
<div class="form-group {{ $errors->first('seo_title', 'has-error') }}"> | ||
{{ Form::label('seo_title', 'SEO Title :') }} | ||
{{ Form::text('seo_title', old('seo_title'), ['class' => 'form-control']) }} | ||
@if ($errors->has('seo_title')) | ||
<span class="text-red">{!! $errors->first('seo_title') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-12"> | ||
<div class="form-group {{ $errors->first('seo_description', 'has-error') }}"> | ||
{{ Form::label('seo_description', 'SEO Description :') }} | ||
{{ Form::text('seo_description', old('seo_description'), ['class' => 'form-control']) }} | ||
@if ($errors->has('seo_description')) | ||
<span class="text-red">{!! $errors->first('seo_description') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-12"> | ||
<div class="form-group {{ $errors->first('seo_keywords', 'has-error') }}"> | ||
{{ Form::label('seo_keywords[]', 'SEO Keywords :') }} | ||
{{ Form::select('seo_keywords[]', [], old('seo_keywords[]'), ['class' => 'form-control', 'multiple']) }} | ||
@if ($errors->has('seo_keywords')) | ||
<span class="text-red">{!! $errors->first('seo_keywords') !!}</span> | ||
@endif | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="box-footer"> | ||
<a href="{{ route('admin::seo.footers.index') }}" class="btn btn-sm btn-default"> | ||
Cancel | ||
</a> | ||
<button type="submit" class="btn btn-sm btn-primary pull-right"> | ||
<i class="fa fa-fw fa-plus"></i> Add | ||
</button> | ||
</div> | ||
</div> | ||
{{ Form::close() }} | ||
@endsection | ||
|
||
@section('modals') | ||
@endsection | ||
|
||
@section('scripts') | ||
<script> | ||
$(function () { | ||
$('select[name="seo_keywords[]"]').select2({ | ||
tags: true | ||
}); | ||
}); | ||
</script> | ||
@endsection |
Oops, something went wrong.