Commit 7f60268d by Aan Choesni Herlingga

update table key and meta tag keys

parent 239fee29
...@@ -20,24 +20,30 @@ class UpdateController extends Controller ...@@ -20,24 +20,30 @@ class UpdateController extends Controller
$repository = env('GIT_REPOSITORY', 'lorem'); $repository = env('GIT_REPOSITORY', 'lorem');
$command = 'git pull http://'.$username.':'.$password.'@'.$repository.' master'; $command = 'git pull http://'.$username.':'.$password.'@'.$repository.' master';
$data = $request->tokenkey; $data = $request->tokenkey;
$line = 'Token Tidak Valid'; $line = 'Token Tidak Valid';
if ($data == env('TOKEN_KEY', 'lorem')) { if ($data == env('TOKEN_KEY', 'lorem')) {
$line = null; $lines = null;
$result = array(); $result = array();
exec($command, $result); exec($command, $result);
foreach ($result as $line) { foreach ($result as $line) {
$line."\n"; $lines = $lines.$line.'<br>';
} }
if ($line == null) { if ($line == null) {
$line = 'Whoops something when wrong!! Check your username and password'; $line = 'Whoops something when wrong!! Check your username and password';
} }
$command = 'cd .. && php artisan migrate';
exec($command, $resultMigrate);
foreach ($resultMigrate as $lineMigration) {
$lines = $lines.$lineMigration.'<br>';
}
} }
$data = [ $data = [
'data' => $line, 'data' => $lines,
]; ];
return view('webprofile.backend.update.result', $data); return view('webprofile.backend.update.result', $data);
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateKeyMigration extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('swp_posts', function (Blueprint $table) {
$table->string('keys')->nullable();
});
Schema::table('swp_pages', function (Blueprint $table) {
$table->string('keys')->nullable();
});
Schema::table('swp_informations', function (Blueprint $table) {
$table->string('keys')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
}
}
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{!! Form::close() !!} {!! Form::close() !!}
<div style="padding-left: 10px; padding-top: 15px;"> <div style="padding-left: 10px; padding-top: 15px;">
{{ $data }} {!! $data !!}
</div> </div>
</div> </div>
</div> </div>
......
@extends('webprofile.front.jollyany.master') @extends('webprofile.front.jollyany.master')
@section('meta')
<meta name="{{ Str::slug($setting['web_title']) }}" content="custom"/>
<meta name="description" content="{{ $setting['web_title'] }}">
@if(array_key_exists('default_keyword', $setting))
<meta name="keywords" content="{{ $setting['default_keyword'] }}">
@endif
<meta name="author" content="{{ $setting['web_title'] }}">
@endsection
@section('content') @section('content')
<section class="post-wrapper-top jt-shadow clearfix"> <section class="post-wrapper-top jt-shadow clearfix">
<div class="container"> <div class="container">
......
@extends('webprofile.front.jollyany.master') @extends('webprofile.front.jollyany.master')
@section('meta')
<meta name="{{ Str::slug($setting['web_title']) }}" content="custom"/>
<meta name="description" content="{{ $setting['web_title'] }}">
@if(array_key_exists('default_keyword', $setting))
<meta name="keywords" content="{{ $setting['default_keyword'] }}">
@endif
<meta name="author" content="{{ $setting['web_title'] }}">
@endsection
@section('content') @section('content')
<section class="post-wrapper-top jt-shadow clearfix"> <section class="post-wrapper-top jt-shadow clearfix">
<div class="container"> <div class="container">
......
@extends('webprofile.front.jollyany.master') @extends('webprofile.front.jollyany.master')
@section('meta')
<meta name="{{ Str::slug($data->title) }}" content="custom"/>
<meta name="description" content="{{ {!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 200)) !!} }}">
<meta name="keywords" content="{{ $data->keys }}">
<meta name="author" content="{{ $setting['header_admin'] }}">
@endsection
@section('content') @section('content')
<section class="post-wrapper-top jt-shadow clearfix"> <section class="post-wrapper-top jt-shadow clearfix">
<div class="container"> <div class="container">
......
@extends('webprofile.front.jollyany.master') @extends('webprofile.front.jollyany.master')
@section('meta')
<meta name="{{ Str::slug($data->title) }}" content="custom"/>
<meta name="description" content="{{ {!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 200)) !!} }}">
<meta name="keywords" content="{{ $data->keys }}">
<meta name="author" content="{{ $setting['header_admin'] }}">
@endsection
@section('content') @section('content')
<section class="post-wrapper-top jt-shadow clearfix"> <section class="post-wrapper-top jt-shadow clearfix">
<div class="container"> <div class="container">
......
@extends('webprofile.front.jollyany.master') @extends('webprofile.front.jollyany.master')
@section('meta')
<meta name="{{ Str::slug($data->title) }}" content="custom"/>
<meta name="description" content="{{ {!! strip_tags(substr(html_entity_decode($value->content,ENT_COMPAT,"UTF-8"),0 , 200)) !!} }}">
<meta name="keywords" content="{{ $data->keys }}">
<meta name="author" content="{{ $setting['header_admin'] }}">
@endsection
@section('content') @section('content')
<section class="post-wrapper-top jt-shadow clearfix"> <section class="post-wrapper-top jt-shadow clearfix">
<div class="container"> <div class="container">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment