Skip to content

Error when showing data of query in layout #1573

Answered by tabuna
shah180 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, add a trait for your model Orchid\Screen\AsSource;:

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Orchid\Screen\AsSource;

class Job extends Model
{
    use HasFactory, AsSource;

    protected $connection = 'mysql2';

    protected $fillable = [
        'title',
        'detail',
        'budget',
        'status'
    ];
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shah180
Comment options

Answer selected by shah180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants