1. 2 Xây dựng giao diện settings (ok)
Previous1. 1 Xây dựng giao diện backend (laracasts/flash) (ok)Next1. 3 Xử lý logic làm giao diện (ok)
Last updated
Last updated
C:\xampp82\htdocs\lva7\app\Http\Controllers\SettingController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SettingController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view("backend.settings.index");
}
}
C:\xampp82\htdocs\lva7\resources\views\backend\settings\index.blade.php
@extends('backend.layouts.app')
@section('title')
@lang('Dashboard')
@endsection
@section('breadcrumbs')
<x-backend-breadcrumbs>
<x-backend-breadcrumb-item
type="active"
icon='fas fa-cogs'
>Settings</x-backend-breadcrumb-item>
</x-backend-breadcrumbs>
@endsection
@section('content')
<div class="card mb-4">
<div class="card-body">
<p>section-header</p>
<!-- Dashboard Content Area -->
<div class="row mt-4">
<div class="col">
<form
method="post"
action="{{ route('backend.settings') }}"
class="form-horizontal"
role="form"
>
@csrf
<div class="card card-accent-primary mb-4">
<div class="card-header">
<i class="fas fa-cube"></i>General
</div>
<div class="card-body">
<p class="text-muted">All the general settings for application.</p>
<div class="row mb-3">
<div class="col">
<div class="form-group mb-3">
<label
for="app_name"
class="form-label"
> <strong>App Name</strong> (app_name)</label> <span class="text-danger"> <strong>*</strong> </span>
<input
type="text"
name="app_name"
value="Laravel Starter 123"
class="form-control"
id="app_name"
placeholder="App Name"
required
>
</div>
<div class="form-group mb-3">
<label
for="footer_text"
class="form-label"
> <strong>Footer Text</strong> (footer_text)</label> <span class="text-danger"> <strong>*</strong> </span>
<input
type="text"
name="footer_text"
value="<a href="https://github.com/nasirkhan/laravel-starter/" class="text-muted">Built with ♥ from Bangladesh</a>"
class="form-control"
id="footer_text"
placeholder="Footer Text"
required
>
</div>
</div>
</div>
</div>
</div>
<div class="row m-b-md">
<div class="col-md-12">
<button class="btn-primary btn">
<i class="fas fa-save"></i> Save </button>
</div>
</div>
</form>
</div>
</div>
<!-- /.row-->
<!-- / Dashboard Content Area -->
</div>
</div>
@endsection
C:\xampp82\htdocs\lva7\resources\views\components\backend-breadcrumb-item.blade.php
@props(['route' => '#', 'icon' => '', 'title' => '', 'type' => ''])
@if ($type)
<li class="breadcrumb-item active">
<span>
@if ($icon)
<i class="{{ $icon }}"></i>
@endif
{{ $slot }}
</span>
</li>
@else
<li class="breadcrumb-item">
<a href='{{ $route }}'>
<i class="{{ $icon }}"></i>
{{ $slot }}
</a>
</li>
@endif