#### Category : database

I want to connect to the database on Laravel Forge. I tried connecting with MySQL Workbench and TablePlus but there was an error saying SSH Connection error; I have generated SSH keys I included my public key on Laravel Forge and used my private key for connecting with the server. Then I tried connecting via ..

How can I add a sql_srv.so extension on Heroku? Im losing hope now, There are no extention on this, also Asure is not free, All I need is its driver to work with a third party database, How can I achieve it? Or are there any link to read on how to add custom php ..

I am slicing the top 3 orders based on the amount like this: Order::orderByDesc(‘amount’)->take(3)->get(); But now, I have to go a bit further. The orders table has a created_by column which is associated with the creator (belongsTo) relationship. First I have to rank the orders based on the amount, and then I have to take ..

I am slicing the top 3 orders based on the amount like this: Order::orderByDesc(‘amount’)->take(3)->get(); But now, I have to go a bit further. The orders table has a created_by column which is associated with the creator (belongsTo) relationship. First I have to rank the orders based on the amount, and then I have to take ..

Im new to laravel and I cant seem to download the pdf of my blade php file. Please help me out! Thank you! This is what I get If i click my "Export to PDF" button in my productlist.blade.php: ErrorException Undefined variable: products (View: C:xampphtdocslaravelproductcrudresourcesviewsproductlist.blade.php) This is my product controller file: <?php namespace AppHttpControllers; use ..

Yo dudz! So… I’m new to laravel and trying to get information from many tables. As a perfectionist freak I am, I can’t go for a join or for a model relationship at this one, I kinda have a problem with both. I have a table PATIENTS that has foreign key status_id. the STATUSES table ..

I am fetching all my GitHub repositories using Campbells GitHub package for Laravel. I made a command and a cronjob which runs every minute and it works perfectly fine. The only problem is that when a repository gets deleted from GitHub it stays in my database instead of also getting deleted. I came across a ..

I want to build a kind of frame for backend and get joins as an array and execute that join something like below : function anEloquentFunction() { return $classObject::select(‘count(*) as allcount’) ->join(function ($query) { switch (isset($this->joins) && !empty($this->joins) && is_array($this->joins)) { case true: foreach ($this->joins as $join) { switch ($join[‘type’]) { case ‘left’: $query = .. Read more I want to make a report for my program, but the problem is i get the rank result that displayed in the program with calculating it in view without storing the result into database, so how can i make a report that show the final result that not in the database and only displayed in .. Read more I am developing an application in Laravel 8 and wanted to connect it to the MariaDB database. Problrm appears when I want to connect to the database via an application. I will add that connection via: extension to VSCode is successful from another computer using Python script succeeds the database page works fine My .env .. Read more I Want to extract data from 4 tables . like sname,cgpa,Group_Cgpa,Room_No and Hostel Name. Relation of table is as follows. AllotmentApps has : id,sname,cgpa and grpID (from Group id Table) columns. Groups has : id,Group_CGPA Room has : id, HostelID (From Hostel) and ResidentID (From Group id). Hostels has: id, Name, Total_Rooms. I’m facing problem .. Read more HOW CAN I DO AN IMAGE CRUD FOR MY RECENT LARAVEL PROJECT? When I create a product, i want to browse my file to store an image to my database in views. When I update a product, i want to browse button with a preview image and the recent image. Note: My Laravel Version is .. Read more It is possible to explain the way the Seasons system works, in the sense that if a series contains five parts and each part contains 30 episodes, how can it work in the database as a structure with Laravel. thanks Sourc.. Read more I want to develop a notification feature to the user every time there is a data change in the database. I’ve been trying to figure out and use Laravel Observers. However, the problem is that the existing data changes not through the model. Data is changed via other applications (desktop). Can I know the data .. Read more I have an online store that has a problem and I want to solve it The problem is that every vendor adds a product and all the information But there are a lot of refined products I want to make a special profile for each product in the Data Base And the shopkeeper fetch it .. Read more I have a "clients" table, with a "public_id" column. This column’s value is generated right before a new client row is created, and its value represents: some word + (total current number of clients + 1). So the first client would be: word 1, the next would be word 2 … etc. This works fine .. Read more i have a form to store image in database but i get error "Call to a member function getClientOriginalExtension() on null" my form.blade.php <form method="POST" action="{{ ‘/admin/data/list’ }}" enctype="multipart/form-data"> @csrf <div class="form-group"> <label for="gambar">Gambar Berita</label> <div class="input-group"> <input type="file" name="gambar" id="gambar"> </div> @error(‘gambar’) <div class="alert alert-danger"> {{$message }} </div> @enderror </div> </div> <!– /.card-body ..

User on website can post different post types. I know how it is implemented on WordPress but I don’ want to use antipatterns. As the first step I have created Post model and migration. Then I want User to have an ability to choose different Post type. For example it can be video, quote, note, ..

I just want someone to tell me the way of handling data from a .JSON file which is created by scraping web pages for data by Parsehub. How do i manupulate JSON data using laravel and mysql like sorting, editing etc etc. Sourc..

please help my… [enter image description here][1] please help me when I want to post a comment the error is displayed SQLSTATE[HY000]: General error: 1364 Field ‘parent_id’ doesn’t have a default value (SQL: insert into comments (comment, user_id, commentable_id, commentable_type, updated_at, created_at) class CommentController.php public function store(Request $request) {$comment = new Comment; $comment->comment = .. Read more I have a Laravel project that currently has users who are all Doctors. I would like other types of user like Teachers, Policemen, etc. to use the site. This requires me to have different roles, which is not an issue. The issue is each type of role requires different user information in the Users table. .. Read more I’m trying to set a default value to a laravel migration. I’m using SQLite. When I try to insert a record with the field where a default value is assigned to, an error returns: SQL error or missing database (table customers has no column named country) This is the migrationscript: php Schema::create(‘customers’, function (Blueprint$table) ..