skip to Main Content

Why am I unable to NOT use timestamps in Laravel?

I have these: posts table public function up() { Schema::create('posts', function (Blueprint $table) { $table->id(); $table->string('title', 64); $table->string('teaser', 128)->nullable(); $table->text('content', 50000); $table->timestamps(); }); } posts model use HasFactory; protected $fillable = ['title', 'teaser', 'content']; public function tags() { return $this->belongsToMany(Tag::class,…

VIEW QUESTION

Laravel "Class "App\Models\review" not found" in production

In my Laravel app there are 3 Models: Movie, User, Review Review: <?php namespace AppModels; use IlluminateDatabaseEloquentFactoriesHasFactory; use IlluminateDatabaseEloquentModel; class Review extends Model { use HasFactory; protected $hidden = ['user_id','movie_id','created_at','updated_at']; public function movie(){ return $this->belongsTo(Movie::class); } public function user(){ return…

VIEW QUESTION

Highlight row if has duplicate value – Laravel

Hello I have these columns 'name', 'email', 'username' and 'ip' how would I check or highlight table row in blade if records has same ip? This is my controller $promo = Promo::with(['participants' => function ($q) { $q->orderBy('winner', 'desc')->orderBy('created_at', 'desc'); }])->find($id);…

VIEW QUESTION
Back To Top
Search