I use the following query to get Project Id and Id of Particular Table in Laravel.
$projectlist = Projects::Where('customer',$request->input('client_name'))->pluck(DB::raw("CONCAT('project_prefix','project_nos') AS projectid"),"id");
I got following Error.
message Illegal offset type in isset or empty
exception ErrorException
file /var/www/msstone/vendor/laravel/framework/src/Illuminate/Support/Str.php
Project Model
namespace App;
use Illuminate\Database\Eloquent\Model;
class Projects extends Model
{
protected $guarded = ['id'];
protected $table = 'projects';
}