Issue I have 3 tables as below: Users Table (has only one phone): id Name phone_id 1 Sam 1 2 Tom 2 /** * @return HasOne */ public function phone() { return $this->hasOne(phones::class); } /** * @return ??? */ public
Continue readingTag: laravel
[SOLVED] <br> not working in Maatwebsite excel export
Issue I use maatwebsite for to export report as excel format . I want to add break within a cell .But is not working.It shows the ‘‘ as tag. public function map($order): array { return [ [ $order->id, $this->getCourse($order), ],
Continue reading[SOLVED] PHPExcel Make Last row bold
Issue This is how we can make the First row text as bold:- $sheet->getStyle(‘A1:’.$sheet->getHighestColumn().’1′)->getFont()->setBold(true); But how can we make the Last row of the sheet as bold? Solution The function $sheet->getHighestRow() should be possible to use. So with your example
Continue reading[SOLVED] Laravel MongoDB 1:n relations
Issue What is the correct way of defining 1:n relations in Laravel using MongoDB between two models Author and Book where one author can have several books while one book has exactly one authors? Author.php class Author extends Model {
Continue reading[SOLVED] Unable to Install @vitejs/plugin-vue inside Laravel project
Issue I created a fresh Laravel project. And to use Vue JS I tried installing this package, @vitejs/plugin-vue But this throws me a set of errors, npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead. npm ERR! code
Continue reading[SOLVED] Why is TinyMCE throwing "b is not a constructor", and "({default{}) is not a constructor" when attempting to upload images on Laravel Forge, not dev?
Issue I have my image upload functionality working in development, for which my environment is Laravel Sail. It is working in development, but not in production Laravel forge where it is throwing ‘b is not a constructor," and "({default{}}) is
Continue reading[SOLVED] Sharing data between all Vue.js components
Issue I’m building a CRUD web app using Laravel/Vue.js for the first time. I’m using a MySQL database and I used many Vue.js components, and each one can access a table in the database. Now I need to make some
Continue reading[SOLVED] Establishing a connection to Pusher only when needed in a Laravel-Vue js application using Echo
Issue I am developing MPA with Vue.js as the frontend and Laravel as the backend. I need real-time features in only one page (one Vue js component). I followed laravel documentation and I have events, broadcasting, Echo and Pusher all
Continue reading[SOLVED] 404 not found on DELETE & PUT methods, but route exist – Laravel & vue js
Issue I don’t know why and how, but when I’m trying to do a PUT or DELETE request, it display "404 not found" even tho the route exist and that everything worked before… My project is base on Laravel &
Continue reading[SOLVED] On Form Submit Inertia is not redirecting to particular page
Issue I’m using Inertia (Vue3 & Laravel 9). I have a form in "Register.vue" Component. On submitting that form I’m calling a controller to process the request. Once the controller process the request I want the controller to redirect to
Continue reading