? ?????? ??? ? ??? ?? ??? ?????. Laravel ??? ??? ???. ?? ??? ???? ??? ??? ? ????. ???? ??????? ???? ?? ??? ???? ?? ? ??? ?????. ?? ????.
? ??? ??
- Laravel: Laravel ????? ???? ??? ?????.
- ??? ?: Laravel? .env ??? APP_KEY? ???? ?????. ? ?? Laravel? ??? ????? ?????.
? ?1??: ???? ??? ??
????? Laravel? encrypt() ? decrypt() ??? ???? ??? ??? ?? ??? ? ???? ???? ?????.
? ?Doctor Model
??? ? ??? ??? ???? Doctor ??? ????? ???????. first_name, last_name, email, mobile ?? ??? ??????? ???? ?? ??????.
<?phpnamespace AppModels;use IlluminateDatabaseEloquentModel;use IlluminateSupportFacadesCrypt;class Doctor extends Model{ protected $fillable = [ 'first_name', 'last_name', 'email', 'mobile', 'hashed_email', 'password' ]; // Automatically encrypt attributes when setting them public function setFirstNameAttribute($value) { $this->attributes['first_name']?=?encrypt($value); ????} ????public?function?setLastNameAttribute($value) ????{ ????????$this->attributes['last_name']?=?encrypt($value); ????} ????public?function?setEmailAttribute($value) ????{ ????????$this->attributes['email']?=?encrypt($value); ????} ????public?function?setMobileAttribute($value) ????{ ????????$this->attributes['mobile']?=?encrypt($value); ????} ????//?Automatically?decrypt?attributes?when?getting?them ????public?function?getFirstNameAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getLastNameAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getEmailAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getMobileAttribute($value) ????{ ????????return?decrypt($value); ????}}
???????
- Setter ??: set{AttributeName ?? }???? ??????? ???? ?? ???? ????? ??().
- Getter ??: ???????? ???? ??? ? get{AttributeName}Attribute()? ???? ???? ?????.
2??: ??? ?? ? ??? ?? ????
?????? ??? ???? ??? ??? ? ????. ???? ???/??? ?? ?? ???? ?? ?????.
? ?????DoctorController
DoctorController? ???? ???? ??? ?????.
???? ???? ??? ?? ????? ??????? ?????.
?? ???? ??? ? ???? ??? ?????.
??? ?????.
<?phpnamespace AppHttpControllers;use IlluminateHttpRequest;use AppModelsDoctor;use IlluminateSupportFacadesHash;class DoctorController extends Controller{ public function register(Request $request) { // Validate the incoming request $validatedData = $request->validate([ ????????????'first_name'?=>?'required|string|max:255', ????????????'last_name'?=>?'required|string|max:255', ????????????'email'?=>?'required|string|email|max:255|unique:doctors,email', ????????????'mobile'?=>?'required|string|size:10|unique:doctors,mobile', ????????????'password'?=>?'required|string|min:8|confirmed', ????????]); ????????//?Hash?the?email?to?ensure?uniqueness ????????$hashedEmail?=?hash('sha256',?$validatedData['email']); ????????//?Create?a?new?doctor?record?(model?will?handle?encryption) ????????$doctor?=?Doctor::create([ ????????????'first_name'?=>?$validatedData['first_name'], ????????????'last_name'?=>?$validatedData['last_name'], ????????????'email'?=>?$validatedData['email'], ????????????'hashed_email'?=>?$hashedEmail, ????????????'mobile'?=>?$validatedData['mobile'], ????????????'password'?=>?Hash::make($validatedData['password']), ????????]); ????????return?response()->json([ ????????????'message'?=>?'Doctor?registered?successfully', ????????????'doctor'?=>?$doctor ????????],?201); ????} ????public?function?show($id) ????{ ????????//?Fetch?the?doctor?record?(model?will?decrypt?the?data?automatically) ????????$doctor?=?Doctor::findOrFail($id); ????????return?response()->json($doctor); ????}}
? ???
- ?? ??: ???? ??? ????, ??? ?? ??? ????, ??? ??? ??? ?? ??, ?, ???, ???? ?? ??? ???? ??????.
- show ???: ID?? ?? ??? ?????. ??? ??? getter ???? ??? ??? ???? ?????. ???? ?????.
? ?3??: ?????? ??
??? ???? ?? doctor ??? ?? ??? ???? ???(????? TEXT ?? LONGTEXT)? ????? ??? ???? ?????.
?? ?????? ??:
Schema::create('doctors',?function?(Blueprint?$table)?{ ????$table->id(); ????$table->text('first_name'); ????$table->text('last_name'); ????$table->text('email'); ????$table->string('hashed_email')->unique();?//?SHA-256?hashed?email ????$table->text('mobile'); ????$table->string('password'); ????$table->timestamps();});
??: ???? ?? ?? ????? ?? ? ? ???? ?? ???? ???? TEXT? ?????.
? ?4??: ?? ?? ?? ??
?? ?? ??? ?? ?? getter? try-catch ??? ?? ?? ??? ?????.
<?phpnamespace AppModels;use IlluminateDatabaseEloquentModel;use IlluminateSupportFacadesCrypt;class Doctor extends Model{ protected $fillable = [ 'first_name', 'last_name', 'email', 'mobile', 'hashed_email', 'password' ]; // Automatically encrypt attributes when setting them public function setFirstNameAttribute($value) { $this->attributes['first_name']?=?encrypt($value); ????} ????public?function?setLastNameAttribute($value) ????{ ????????$this->attributes['last_name']?=?encrypt($value); ????} ????public?function?setEmailAttribute($value) ????{ ????????$this->attributes['email']?=?encrypt($value); ????} ????public?function?setMobileAttribute($value) ????{ ????????$this->attributes['mobile']?=?encrypt($value); ????} ????//?Automatically?decrypt?attributes?when?getting?them ????public?function?getFirstNameAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getLastNameAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getEmailAttribute($value) ????{ ????????return?decrypt($value); ????} ????public?function?getMobileAttribute($value) ????{ ????????return?decrypt($value); ????}}
? ??? ?? ??
- ?? ??: APP_KEY? .env ??? ???? ???? ??? ?????. ? ?? ???/???? ?????.
- ??? ??: ??? ???? ??? ?? ??? APP_KEY ?? ???? ???? ??? ? ???? ?? ????? ??? ??????.
? ???
- ?? ???: ???? ???? ?? setter ???? ???? ?????, ?? ? ???? ????? getter ???? ?????.
- ???? ??: ????? ?? ??? ?? ?? ???? ??? ?? ??? ? ????. .
- ?????? ??: ?????? TEXT ?? LONGTEXT ?? ?????. ??.
- ?? ?? ??: APP_KEY? ???? ?? ?? ??? ?? getter?? ?? ??? ?????.
? ??? Laravel? ??? ??? ? ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











SPA (Single Page Applications) Laravel ? Vue.js? ???? ?? ? ? ????. 1) Laravel?? API ??? ? ????? ???? ??? ??? ?????. 2) vue.js?? ?? ??? ? ??? ??? ??? ??? ????? ? ??? ?? ??? ??????. 3) CORS? ???? ??? ?? ??? AXIOS? ??????. 4) Vuerouter? ???? ??? ??? ???? ??? ??? ??????.

Efficient methods for testing Laravel API interfaces include: 1) using Laravel's own testing framework and third-party tools such as Postman or Insomnia; 2) ?? ???, ?? ??? ? ?? ??? ??; 3) ?? ?? ??? ???? ?????? ??? ?????. ??? ??? ?? API? ???? ??? ???? ?? ? ? ????.

??? ?? Laravel ??? ?? ??? ?? ??? ?? ??? ? ????. 1. ??? ??? ?? ??? ? ? ?? ?? ?? ??. 2. ??? ?? ?? ???? ??? ?? ????? ??????. ??? ?? ?? ???? Laravel? ?? ???? ?? ?? ??? ???? ??, ?? ? ?? ?????? ?????.

Laravel?? ???? ??? ???? ??? ?????. 1) ??? ? ???? ?? ???? ?? ??; 2) ?? ?? ? ??? ??? ???. 3) Artisan Command? ???? ??? ?? ?? ??; 4) ?? ??? ???? ??; 5) Packagist? ?? ?? ? ?? ??; 6) ??? ??? ??; 7) ??? ?? ??; 8) ?? ?? ???? ??? ??.

Laravelsocialite ???? ???? Laravel ??? ??? ?? ??? ???? ?? ? ? ????. 1. ??? ??? ?? : ComposerRequirelaravel/Socialite ??. 2. ??? ?? ?? ? ?? ?? : config/app.php?? ?? ??? ??????. 3. API ?? ?? ?? : .env ? config/services.php?? ?? ??? API ?? ??? ??????. 4. ?? ???? ?? : ?? ??? ??? ????? ???? ?? ???? ? ?? ??? ??????. 5. FAQ ?? : ??? ???, ??? ???, ?? ? ?? ??? ?????. 6. ??? ?? :

Laravel?? ?? ??? ?? ?? ?? ??? ?????. 1. ??? ???? ???? .env ???? ?? ?? ??? ?????. 2. ??/web.php?? ???? ??? ??? ?????. 3. ??? ??? ??? ??; 4. ??? ??? ??? ??? ?? ?????? ???? ??? ?? ??? ??????. 5. ??? ?? ??? ?????? ??? ??????. 6. ???? ???? ??? ? ???? ?? ???? ?? ????? ??????.

Laravel ??????? ???? ?? ???? SQL ??, XSS (Cross-Site Scripting Attack), CSRF (Cross-Site Request Resperery) ? ?? ??? ???? ?????. ?? ???? ??? ?????. 1. SQL ??? ??? ?? ?? ??? ??? Eloquentorm ? QueryBuilder? ??????. 2. ??? ??? ???? XSS ??? ???? ?? ??? ??? ???? ???????. 3. CSRF ??? CSRF ?????? ?? ????? ?????? ?? ? AJAX ???? CSRF ??? ??????. 4. ?? ??? ???? ?? ?? ???? ???? ???? ?????. 5. ??? ?? ???? ???? ???? ?? ??? ? ?? ?? ? ?? ???? ?????.

????? Laravel? ??? ?????? HTTP ??? ?? ?? ???? ? ?????. ?? ?? : 1. ???? ?? : "Phpartisanmake : Middlewarecheckrole"??? ??????. 2. ?? ?? ?? : ?? ? ??? ?? ??? ????. 3. ???? ?? : kernel.php? ????? ??????. 4. ???? ?? : ??? ??? ????? ??????.
