garkein bock mehr alter
This commit is contained in:
parent
ef3cc1e756
commit
a11a9cf99c
|
@ -8,6 +8,7 @@ use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
use App\Models\invoiceSettings;
|
||||||
|
|
||||||
class SettingsController extends Controller
|
class SettingsController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -47,6 +48,8 @@ class SettingsController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return redirect()->route('admin.settings.index')->with('success', 'Invoice settings updated!');
|
return redirect()->route('admin.settings.index')->with('success', 'Invoice settings updated!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
app/Models/InvoiceSettings.php
Normal file
21
app/Models/InvoiceSettings.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class invoiceSettings extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'invoice_settings';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'company_name',
|
||||||
|
'company_adress',
|
||||||
|
'company_phone',
|
||||||
|
'company_vat',
|
||||||
|
'company_web'
|
||||||
|
];
|
||||||
|
}
|
37
database/migrations/2021_11_30_174439_invoice-settings.php
Normal file
37
database/migrations/2021_11_30_174439_invoice-settings.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class InvoiceSettings extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('invoice_settings', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('company_name')->nullable();
|
||||||
|
$table->string('company_adress')->nullable();
|
||||||
|
$table->string('company_phone')->nullable();
|
||||||
|
$table->string('company_vat')->nullable();
|
||||||
|
$table->string('company_mail')->nullable();
|
||||||
|
$table->string('company_web')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('invoice_settings');
|
||||||
|
}
|
||||||
|
}
|
|
@ -100,6 +100,34 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-lg-4 col-12">
|
<div class="col-md-6 col-lg-4 col-12">
|
||||||
|
<!-- Name -->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
<input type="text"
|
||||||
|
class="custom-text-input" name="company-name" id="company-name">
|
||||||
|
<label class="custom-text-label selected"
|
||||||
|
for="company-phone">{{__('Enter your Company Name')}}</label>
|
||||||
|
</div>
|
||||||
|
@error('company-name')
|
||||||
|
<span class="text-danger">
|
||||||
|
{{$message}}
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
<!-- adress -->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
<input type="text"
|
||||||
|
class="custom-text-input" name="company-adress" id="company-adress">
|
||||||
|
<label class="custom-text-label selected"
|
||||||
|
for="company-phone">{{__('Enter your Company Adress')}}</label>
|
||||||
|
</div>
|
||||||
|
@error('company-adress')
|
||||||
|
<span class="text-danger">
|
||||||
|
{{$message}}
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
<!-- Phone -->
|
<!-- Phone -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
@ -114,20 +142,7 @@
|
||||||
</span>
|
</span>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<!-- Name -->
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="custom-file mb-3 mt-3">
|
|
||||||
<input type="text"
|
|
||||||
class="custom-text-input" name="company-name" id="company-name">
|
|
||||||
<label class="custom-text-label selected"
|
|
||||||
for="company-phone">{{__('Enter your Company Name')}}</label>
|
|
||||||
</div>
|
|
||||||
@error('company-name')
|
|
||||||
<span class="text-danger">
|
|
||||||
{{$message}}
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
<!-- VAT -->
|
<!-- VAT -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
@ -143,20 +158,6 @@
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- adress -->
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="custom-file mb-3 mt-3">
|
|
||||||
<input type="text"
|
|
||||||
class="custom-text-input" name="company-adress" id="company-adress">
|
|
||||||
<label class="custom-text-label selected"
|
|
||||||
for="company-phone">{{__('Enter your Company Adress')}}</label>
|
|
||||||
</div>
|
|
||||||
@error('company-adress')
|
|
||||||
<span class="text-danger">
|
|
||||||
{{$message}}
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
<!-- email -->
|
<!-- email -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
@ -186,6 +187,25 @@
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- logo -->
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-file mb-3">
|
||||||
|
<input type="file" accept="image/x-icon" class="custom-file-input"
|
||||||
|
name="logo" id="logo">
|
||||||
|
<label class="custom-file-label selected"
|
||||||
|
for="favicon">{{__('Select Invoice Logo')}}</label>
|
||||||
|
</div>
|
||||||
|
@error('logo')
|
||||||
|
<span class="text-danger">
|
||||||
|
{{$message}}
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- end -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue