Jump to content

ali_254

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ali_254

  • Rank
    Member
  • Birthday 05/07/1991

Profile Information

  • Gender
    Male
  1. hi.. i follow this page for create user login: laravel-8-authentication-tutorial i run this code: npm install but i Received this error: error 'npm' is not recognized as an internal or external command, operable program or batch file. whats problem? please help
  2. i found problem.. problem is from version of php , i Upgrade version and install laraval 8 with success
  3. i also inter this code: composer create project laravel/laravel test 8.0 but , result is: [InvalidArgumentException] Could not find package laravel/laravel with version 8.0 in a version installable using your PHP version, PHP extens ions and Composer version. PHP Version is 7.4.9 whats problem? thanks
  4. hi... i install last version of composer and inter this code for install laravel: composer create-project --prefer-dist laravel/laravel blog Laravel is successfully installed but when inter code "php artsisan --version" in terminal , result is version 5 !!! i need to install laravel version 8 , whats problem? thanks
  5. ok thanks , but i have a problem.. i add this code in controller but variable $data1 in file blade.php Cannot be identified class FlightController extends Controller { public function function1(Request $request,$id ){ $data1=Flight::find($id); return view('audi')->with('id',$id)->with('a',$data1); } } error: (2/2) ErrorException Undefined variable: data1 (View: C:\wamp64\www\Amozesh_php\shoplaravel\resources\views\audi.blade.php) file blade.php: @extends('layout.master') @section('content') <h2>ali niknami</h2>
  6. hi... i create two table in laravel and I created a "join" operation between them. controller file: class FlightController extends Controller { public function function1(Request $request,$id ){ $data1=Flight::find($id); $a=$data1->FlightComment(); dd($a); return view('audi')->with('id',$id)->with('a',$a); } } Variable "A" is an array, how can I display it in file "blade.php"? thanks Flight table: FlightComment:
  7. thanks , but i delete all table in phpmyadmin and Reinstall the code "php artisan migrate" , Problem solved, thanks a lot
  8. hi ... I made a table called: flights , Also, I want to create another table and run the "join" operation between them. this table called: flight_comments table flights: public function up() { Schema::create('flights', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); $table->times
  9. thanks... i edit code . The problem was solved.. $data1=Motorolla::find(1);
  10. hi... i create model of eloquent end create table.... in file controller , i add this code but return null😪 public function index2(Request $request,$id){ $data1=Motorolla::find($request['1']); dd($data1); return view('audi')->with('id',$id)->with('data1',$data1); } file web.php: Route::get('/audi/{id}','HomeController@index2' ); table motorolla: public function up() { Schema::create('motorollas', function (Blueprint $table) { $table->bigIncrements('id'); $table->string(
  11. Unfortunately I did not understand, what is the problem?
  12. thanks , yes! file Ultimate.php: <?php namespace App; use Illuminate\Database\Eloquent\Model; class Ultimate extends Model { // }
  13. hi... I want to show the tables with Eloquent. i create one model in folder "app" and create migratione . in file controller add this codes : <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use app\Ultimate; class HomeController extends Controller { // public function index2(Request $request,$id){ $data1=Ultimate::all(); dd($data1); return view('users')->with('id',$id); } } But at runtime, an error occurs. error : (1/1) FatalErrorException Class 'app\Ultimate' not found in Home
  14. I found a solution for this problem... change table engine to=InnoDB
×
×
  • 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.