String to array Laravel 8
I'm trying to convert seats to an array in the controller. this is how the seats data is sent to the controller seats : "B7D7G10" i want to convert it to look something like this "B7 , D7 , G10"…
I'm trying to convert seats to an array in the controller. this is how the seats data is sent to the controller seats : "B7D7G10" i want to convert it to look something like this "B7 , D7 , G10"…
maybe someone know how to insert pivot table in Laravel 8 automatically every i insert counselings table? I have Model Counseling n to n Problem, Input form counselings table problems table Counselings Model Problem Model Controller public function create() {…
I need a little help.. In case of validation errors, when the page is reloaded I lose the information entered previously. This is my code: Controller: public function create() { $nationalities = array('Italian','Brazilian','Spanish','Romanian'); return view('guest.create', ['nationalities'=>$nationalities); } public function store(Request…
I have a database with 3 tables. A separate model is connected to each table, and there is a controller that accepts values from all models. On the site page, I will have 3 tables that will be populated from…
it's been a while since I stuck in this problem. So I want to make a dynamic selection, when I select a nis (student_id) then the column nama (name) is filled with the student name. Input form Output i want…
I'm trying to display a data by month and displays the product with the highest value or bought quantity. But I don't know how I should do it. This is the code I have and tried so far public function…
i tried to put my website's logo but however it's not appears. note: i already reload many times, and change the browser. <link rel="icon" href="/img/logo-brebes.png"> <title>SIADU APP</title> file directory : public->img->logo-brebes.png Thank you if there anyone can help me with…
I've Laravel route with GET & POST as below Route::get("test1","ApiTestController@test1"); Route::post("test1","ApiTestController@test1"); Now I'm trying to check some condition & if it remain true then I want to call controller else i want to show error without even going into controller.…
I'm trying to use a HasMany relation in a HasOne. I have following Models: class Auction extends Model { //... public function bids(): HasMany { return $this->hasMany(Bid::class, 'auction_id'); } public function approvedBids(): HasMany { return $this->bids()->approved(); } public function topBids():…
I have a table with 3 columns: firstname lastname fullname in migration: Schema::create('owners', function (Blueprint $table) { $table->id(); $table->string('firstname',20); $table->string('lastname', 20); $table->string('fullname')->storedAs('CONCAT(firstname,lastname)'); $table->timestamps(); }); the problem is that i want to change the concatenation order in the controller i tried…