Эко система


Download 1.63 Mb.
bet12/15
Sana19.06.2023
Hajmi1.63 Mb.
#1603310
1   ...   7   8   9   10   11   12   13   14   15
Bog'liq
kirish

    Bu sahifa navigatsiya:
  • ILOVA
III. Internet saytlari
1. http://crypto.nsu.ru
2. www.intuit.ru
3. www.cryptomach.ru
4. http://www.cyberforum.ru
5. http://ruscrypto.ru
6. https://www.techtarget.com/searchsecurity/definition/role-based-access-controlRBAC#:~:text=What%20is%20role%2Dbased%20access,an%20employee’s%20roles%20and%20responsibilities.

ILOVA


Asosiy tizim fayllari:
User.php:
namespace App\Models;
use App\Models\Admin\Filial;
use App\Models\Admin\Region;
use App\Models\Admin\Role;
use App\Models\Admin\Well;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Kyslik\ColumnSortable\Sortable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use HasFactory, Sortable;
protected $guarded = [];
public $sortable = ['full_name', 'login', 'phone'];
public function scopeFio($query, $data = null)
{
if($data){
return $query->where('full_name', 'like', '%'.$data.'%');
} return $query; }
public function role()
{
return $this->belongsTo(Role::class);
}
public function filial()
{
return $this->hasOne(Filial::class);
}
public function uploadImage($file, $path, $old = null, $sub_path = null)
{
if ($old != null && file_exists(public_path() . '/' . $old)) {
unlink(public_path() . '/' . $old);
}
$image = '('.time() . ')' . $file->getClientOriginalName();
if (is_null($sub_path)) {
$file->move(public_path("storage/$path/"), $image);
$this->avatar = "storage/$path/" . $image;
$this->save();return "storage/$path/" . $image;
} else {
$file->move(public_path("storage/$path/$sub_path/"), $image);
$this->avatar = "storage/$path/$sub_path/" . $image;
$this->save();return "storage/$path/$sub_path/" . $image; } }
public function well() { return $this->hasOne(Well::class); }}

Download 1.63 Mb.

Do'stlaringiz bilan baham:
1   ...   7   8   9   10   11   12   13   14   15




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling