-
Notifications
You must be signed in to change notification settings - Fork 1
/
laravel need command.php
77 lines (65 loc) · 2.53 KB
/
laravel need command.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
php artisan migrate:rollback --step=1
===========
git config --global --unset user.email
==============
$loop->iteration
======================
php artisan migrate:rollback --path=Modules/YourModule/database/migrations/2020_05_15_xxxxxx_create_your_table.php
=============
@if($MedicineGroup->name == $EditMedicine->group)? selected : '' @endIf
@if($MedicineGroup->name == '')? selected : '' @endIf
@if ( $Doctor->doc_status == 'active') ? status-green @else status-red @endif
<span class="custom-badge @if ($Department->dept_status == 'active') ? status-green @else status-red @endif">{{ $Department->dept_status }}</span>
==================
composer require haruncpi/laravel-id-generator
use Haruncpi\LaravelIdGenerator\IdGenerator;
public static function boot()
{
parent::boot();
static::saving(function ($model) {
$model->out_p_id = IdGenerator::generate(['table' => 'out_patients', 'field'=>'out_p_id', 'length' => 10, 'prefix' => 'OUT-PAT-']);
});
}
=================
if ($request->file('photo')) {
$photoname = $request->file('photo')->getClientOriginalName();
$request->photo->storeAs('public/images', $photoname);
$User->profile_photo_path = $photoname;
}
if ($request->file('photo')) {
$path = storage_path().'/app/public/images/';
$file_old = $path . $OldData->profile_photo_path;
unlink($file_old);
$photoname = $request->file('photo')->getClientOriginalName();
$request->photo->storeAs('public/images', $photoname);
$OldData->profile_photo_path = $photoname;
}
$OldData->update();
===============
'nullable|mimes:jpg,jpeg,png|max:2048'
php artisan config:clear
php artisan cache:clear
===========
<td>
@php $patient=collect($patients)->where('out_p_id',$appointment->app_p_id)->first()
@endphp
{{$patient->out_p_name}}
</td>
===========
php artisan migrate:refresh --path=/database/migrations/ 2014_10_12_000000_create_users_table.php
php artisan migrate:rollback --path=/database/migrations/
php artisan migrate --path=/database/migrations/
=========
$id = User::insertGetId(
['email' => 'john@example.com','name' => 'john']
);
===================
use Illuminate\Support\Str;
return Str::words($this->description, 10, '...');
{{\Illuminate\Support\Str::limit($category->name, 20, $end='.......')}}
=================
$dd = $request->atten_date;
$date = Carbon::createFromFormat('Y-m-d', $dd);
$monthName = $date->format('M');
$year = $date->format('Y');
$day = $date->format('d');