Jump to content

ali_254

Members
  • Posts

    97
  • Joined

  • Last visited

Everything posted by ali_254

  1. I understand the mistake, but to solve it; I have not found a solution
  2. Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires php ^7.2 but your php version (8.1.0) does not satisfy that requirement. Problem 2 - laravel/passport[v8.3.0, ..., 8.x-dev] require php ^7.2 -> your php version (8.1.0) does not satisfy that requirement. - Root composer.json requires laravel/passport ^8.3 -> satisfiable by laravel/passport[v8.3.0, ..., 8.x-dev].
  3. I mean: Solar Hijri Calender
  4. Hi, I downloaded a project from GitHub. When I execute "composer update" command , I get the following error: Your requirements could not be resolved to an installable set of packages please guide me
  5. The date is stored in the database in the "Gregorian date" format. I want to turn it into "solar history" when I receive the information
  6. If I want to use accessor or mutator, I have to write it on all models ... I have 60 models in my project! I want to change the original Eloquent class, is it possible? Thanks
  7. hi... I want when receiving information from the database , Make a change in one of the fields. I do not want to write the change function in the field on all models. I want to make changes to all the eloquent classes. (override methods). In all tables, I have a history field(created_at). I want to make the desired changes to this field when I receive the information
  8. Thanks ... but I want to know, what is the role of Laravel's default middlewares? For example, what is the role of TrustProxies Middleware? or , ShareErrorsFromSession Middleware , What is its function? Laravel does not mention them in the documents
  9. Hi, in the kernel file, a number of arrays are defined... protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, \Fruitcake\Cors\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, ]; protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, ], protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, ]; But Laravel's document does not explain them, what is the reason? https://laravel.com/docs/8.x/middleware
  10. hi. I wrote this code and printed it: $category=Category::find(16); dd($category); The result: (The result of executing the above code , return an object of the category class.) App\Models\Category {#1353 ▼ #connection: "mysql" #table: "categories" #primaryKey: "id" #keyType: "int" +incrementing: true #with: [] #withCount: [] +preventsLazyLoading: false #perPage: 15 +exists: true +wasRecentlyCreated: false #escapeWhenCastingToString: false #attributes: array:5 [▶] #original: array:5 [▶] #changes: [] #casts: [] #classCastCache: [] #attributeCastCache: [] #dates: [] #dateFormat: null #appends: [] #dispatchesEvents: [] #observables: [] #relations: [] #touches: [] +timestamps: true #hidden: [] #visible: [] #fillable: array:2 [▶] #guarded: array:1 [▶] } but , When I run this code: $category=Category::find(16); $class_vars = get_object_vars($category); dd($class_vars); result: array:5 [▼ "incrementing" => true "preventsLazyLoading" => false "exists" => true "wasRecentlyCreated" => false "timestamps" => true ] Which of the results, Are the real properties of category class ? I'm confused
  11. thank you. For direct use of classes (do not use Facades) Should we use "Service Container" ?
  12. hi . By default, facades is disabled in the Lumen framework.Can it be disabled in Laravel as well? And had direct access to classes?
  13. I understand, thank you
  14. thanks... Also, does this command also produce a query? return $this->belongsTo(Category::class,'cat_id','id');
  15. Thanks a lot... How can I see it? please explain more... Can you write an example? Thanks
  16. hi. When we use the following commands to Join to another table: return $this->belongsTo(Category::class,'cat_id','id'); How can I see the real query? I want to see the query produced by Eloquent orm
  17. thanks... collection class in laravel , Uses standard php functions? (Functions of working with arrays in php) Or does it use other "mechanisms"?
  18. hi... hello everybody... I create model and wrote this code in controller (my model name in Category): $category=Category::all(); dd($category); When I use "all" method , This returns the result: Illuminate\Database\Eloquent\Collection {#1024 ▼ #items: array:3 [▶] #escapeWhenCastingToString: false } In fact, it is the output of the Eloquent/collection class. But, when I use "first" method: $category=Category::first(); dd($category); Returns the Models\Category class: App\Models\Category {#1022 ▶} According to Laravel documents: Our output must be from Eloquent/collection class ... But, when I use "first" method , Returns the Models\Category class. what is the reason?!!
  19. hi... i remove composer and reinstalled it... I get this error when try to install Laravel version 8 https://repo.packagist.org could not be fully loaded (curl error 28 while downloading https://repo.packagist.org/packages.json: Connection timed out after 10004 milliseconds), package information was loaded from the local cache and may be out of date Of course, Laravel is installed and running , But this error is seen when installing Laravel
  20. Hi, I want to design a login system that I can set up an authentication system for two separate panels ... That is, the admin panel is separate, the client panel is also separate. What package do you suggest? Is this feature (Multiple Authentication) , included in packages by default? Or should the kernel of the package be changed? thanks
  21. I want to use the pagination in CodeIgniter 4. When I use Ajax, it is not possible to use pagination.... google
  22. hi , i want use from jquery ajax for fetch date from databse and use pagination... I searched a lot for sample code related to Create AJAX Pagination in CodeIgniter 4 But I did not find any information ... please help me Or provide the appropriate code.thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.