dan3460

dan3460

Haddon Hts

Member Since 1 Year Ago

Experience Points 12,100
Experience
Level
Lessons Completed 83
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

09 Oct
2 months ago

dan3460 left a reply on Weird Behavior In Yajra Datables Controller Function.

@jaythanki Thanks for the answer. I spent several hours on this problem, testing and trying to get at the root of the problem. I created a test app and started to go over step by step. The problem was in the data. I'm connected to a test database with many orphan records, the program was crashing on a record that did not have a shipper. All is fine now.

08 Oct
2 months ago

dan3460 started a new conversation Weird Behavior In Yajra Datables Controller Function.

I have been working with Laravel Datatables for a while and i like them very much, until now... I don't know if people here are familiar with them but this is my problem. It worked until i added a column that uses a belongs to relationship.

    public function growerSearchLocal(Request $request)
    {
        $growers = Grower::where('grower_name', 'like', '%' . $request->growerText . '%')
            ->get();

        return DataTables::of($growers)
            ->addColumn('country', function(Grower $grower){
                return $grower->address->country->country_name;
            })
            ->addColumn('shipper', function(Grower $grower){
                return $grower->shipper->entity->entity_name;
            })
            ->make(true);
    }

The first column returns a has one relationship and the second is the one that returns belong to relationship. I get an error message because the return is null. I tested to make sure that i was returning the right thing:

    public function test()
    {
        $grower = Grower::find(9);

        dd($grower->shipper->entity->entity_name);
    }

The function above return the correct data. I even tried to force getting the shipper data but $shipper gives me null

    public function growerSearchLocal(Request $request)
    {
        $growers = Grower::where('grower_name', 'like', '%' . $request->growerText . '%')
            ->get();

        return DataTables::of($growers)
            ->addColumn('country', function(Grower $grower){
                return $grower->address->country->country_name;
            })
            ->addColumn('shipper', function(Grower $grower){
                $shipper = Shipper::where('entity_id', $grower->entity_id)->first();
                dd($shipper);
                return $shipper->shipper_name;
            })
            ->make(true);
    }

Any idea?

06 Oct
2 months ago

dan3460 left a reply on Yajra Datatables Returning Escaped Characters

In case that someone has the same problem i got the answer looking at the config file. There is a list of column names that are allowed to have raw data, just need to add column names there.

dan3460 started a new conversation Yajra Datatables Returning Escaped Characters

Don't know if someone here can help me here. I started using the plug in for Datatables and is fantastic. On my test app i have a Datatable that return a column with html code, works fine. On my real application for some reason the Datatable is returning especial characters instead of "<" or ">" this is my function returning the data:

public function getShippers()
{
    $shippers = Shipper::where('entity_belong', Auth::user()->entity_id)->get();

    return Datatables::of($shippers)
        ->addColumn('name', function(Shipper $shipper){
            return $shipper->entity->entity_name;
        })
        ->addColumn('country', function(Shipper $shipper){
            return $shipper->entity->address->country->country_name;
        })
        ->addColumn('documents', function(Shipper $shipper){
            return $shipper->documents->count();
        })
        ->addColumn('openLine', "<i class='fas fs-plus-square'></i>")
        ->addColumn('select', function(){
            return '<td><input type="checkbox" name="" id=""></td>';
        })
        ->make(true);
}

and here is the json:

{
"draw": 0,
"recordsTotal": 2,
"recordsFiltered": 2,
"data": [
{
"shipper_id": "8",
"entity_id": "21",
"entity_belong": "20",
"shipper_connected": 0,
"shipper_request": null,
"shipper_connect": 0,
"shipper_ds": null,
"id": "17",
"created_at": "2018-09-16 12:52:52",
"updated_at": "2018-09-16 12:52:52",
"name": "Exser Ltd",
"country": "Chile",
"documents": "1",
"openLine": "&lt;i class=&#039;fas fs-plus-square&#039;&gt;&lt;/i&gt;",
"select": "&lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;&quot; id=&quot;&quot;&gt;&lt;/td&gt;"
},
{
"shipper_id": "9",
"entity_id": "26",
"entity_belong": "20",
"shipper_connected": 0,
"shipper_request": null,
"shipper_connect": 0,
"shipper_ds": null,
"id": "17",
"created_at": "2018-09-27 21:07:54",
"updated_at": "2018-09-27 21:07:54",
"name": "La Rosa Sofruco",
"country": "Chile",
"documents": "1",
"openLine": "&lt;i class=&#039;fas fs-plus-square&#039;&gt;&lt;/i&gt;",
"select": "&lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;&quot; id=&quot;&quot;&gt;&lt;/td&gt;"
}
],
"input": []
}

Now the weird thing is that when I was building the function i created the select and i had the check box in the document. When i added the openLine is when i got the problem and after copying, moving around, switching and changing now none of them work.

04 Oct
2 months ago

dan3460 started a new conversation Seeding Database With 500 Users And Each User With Random Number Of Posts

I now how to seed 500 users. Now i'm trying to get them a random number of post from 2 to 15. So I created a factory for the Posts:

use Faker\Generator as Faker;
use App\Posts;

$factory->define(Posts::class, function (Faker $faker) {
    return [
        'title' => $faker->sentence(5),
        'text' => $faker->text(),
        'user_id' => factory('App\User')->create()->id
    ];
});

and a seeder:


use Illuminate\Database\Seeder;

class PostsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory('App\Posts', rand(2,15))->create();
    }
}

but when i run php artisan db:seeder it only creates a random number of users (from 2 to 15) each with 1 post. How can an achieve what i want?

Thanks for the help,

30 Sep
2 months ago

dan3460 left a reply on Serialization Of Closure Is Not Allowed, In Queuing A Mail

For some reason the mail enters on a loop when i do the proposed solution. To test i'm not using the $request anywhere, i only passing it as shown by @lostdreamer_nl to the SendDocument Mailable. I took all references also from the SendDocument.blade.php. Here is the Mailalble:

<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\File;
use App\Jobs\DeleteFiles;
use App\Document;

class SendDocuments extends Mailable
{
    use Queueable, SerializesModels;

    public $files;
    public $request;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($files, $request)
    {
        $this->files = $files;
        $this->request = $request;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {

        $message = $this->markdown('mails.sendDocuments');
        if ($this->files) {
            foreach ($this->files as $file) {
                File::copy(storage_path('app/' . $file->file_id), public_path($file->file_id));
                $message->attach(public_path($file->file_id), [
                    'as' => $file->type->document_type_name . '-' . $file->audit . '.pdf',
                    'mime' => 'application/pdf'
                ]);
                DeleteFiles::dispatch(public_path($file->file_id))->delay(now()->addSeconds(config('system.deleteTime')));
            }
        }

        return $message;
    }
}

dan3460 started a new conversation Serialization Of Closure Is Not Allowed, In Queuing A Mail

I have a simple email that sends files to a customer.

    public function storeReceiver(Request $request)
    {
        $files = Document::whereIn('document_id',explode(',',$request->fileList))->get();
        $receiver = Receiver::find($request->receiverID);

        Mail::to($receiver->entity->entity_contact_email)->queue(new SendDocuments($files));
    }

That works fine, but in the request i also have some text that i want to put in the body of the email. So when i do this:

Mail::to($receiver->entity->entity_contact_email)->queue(new SendDocuments($files,$request));

Gives me the error in the title. If i replace queue by send, works fine. So its clearly complaining about the two parameters in the mail object when sent to the queue. Is there any way around this?

27 Sep
2 months ago

dan3460 left a reply on Unable To Find Socket Transport Starttls

Thanks for the idea. I will try this weekend.

dan3460 left a reply on Unable To Find Socket Transport Starttls

I could not solve this problem, i don't know if this is a web server problem or a mail server problem. Because i have to move on, i created a gmail account that I'm using to manage the emails from the site. Not the best solution but will have to do in the meantime.

26 Sep
2 months ago

dan3460 left a reply on Unable To Find Socket Transport Starttls

I setup a test site on the server and loaded a basic Laravel app that sends a test email. On my developing machine it sends emails no problem using the credential set above. On the test site doesn't work, so it is definitely a server problem. Now, on that same server i have a couple of applications that send email, they where built on Laravel 5.2, i was supposed to upgrade them to 5.7 to add more functions to the sites but that is on hold now. (good thing that i fund this problem before, other wise i will be in trouble). So, probably the email system in 5.7 got upgraded and now is checking for something that the old version did not checked for.

Any ideas will be appreciated.

25 Sep
2 months ago

dan3460 left a reply on Unable To Find Socket Transport Starttls

I have worked for about 6 hours on this problem and i'm not getting anywhere. I downloaded the Ca bundle certificates made sure that php.ini openssl.cafile is pointing to the downloaded certificate and nothing. I hit a roadblock. Don't know where to turn. Anyone has ideas?

24 Sep
2 months ago

dan3460 left a reply on Unable To Find Socket Transport Starttls

I'm done testing today. I setup my development computer with the credentials above and worked fine, with encryption as TLS. I think there is definitely something not correctly configured in my production box.

dan3460 left a reply on Unable To Find Socket Transport Starttls

I tried both on the .env file:

MAIL_DRIVER=smtp
MAIL_HOST=box.kolbach.biz
MAIL_PORT=587
MAIL_USERNAME=xxxxxxxxxx
MAIL_PASSWORD=xxxxxxxxxx
MAIL_ENCRYPTION=TLS

I get different errors: with TLS:

Production.ERROR: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed {"exception":"[object] (ErrorException(code: 0): stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed at /var/www/fsmadm.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:94)

with STARTTLS:

[2018-09-25 00:08:41] Production.ERROR: Connection could not be established with host box.kolbach.biz [Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP? #32686] {"exception":"[object] (Swift_Transpor$
[stacktrace]

dan3460 left a reply on Unable To Find Socket Transport Starttls

Found the directory where the extensions are stored: /usr/lib/php/20160303. There is a bunch of .so files but php_openssl.so is not there.

dan3460 left a reply on Unable To Find Socket Transport Starttls

Sorry, running ubuntu.

23 Sep
2 months ago

dan3460 started a new conversation Unable To Find Socket Transport Starttls

I'm testing a new mail server provider which requires a smtp connection with STARTTLS. Is showing me the following message:

[Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP? #32686]

I fund in php.ini php_openssl which i un-commented but did not solved the problem and when taking the server up or down gave an error saying that could not find php_openssl.dll.

Also reading on the web seem to indicate that un-commenting php_openssl only works on windows. Does anyone knows how to solve this issue?

21 Sep
2 months ago

dan3460 left a reply on Delete File After Viewing Or Disconecting

In case any one reads this post. I took @Cronix idea and created a Queue to delete the file. Actually was quite easy. I created a job called DeleteFiles to which i pass the URL of the file, x amount of seconds latter the file is gone. I will put the number of seconds on a setup file so it can be controlled and fine tuned.

20 Sep
2 months ago

dan3460 left a reply on Delete File After Viewing Or Disconecting

Understood and agree. Thanks for the help.

dan3460 left a reply on Delete File After Viewing Or Disconecting

Thanks Cronix, sound very interesting.

dan3460 started a new conversation Delete File After Viewing Or Disconecting

I'm presenting a PDF file on a iframe to the user. This file is stored on the storage folder and i make a copy to the public folder for presentation. I'm trying to figure out the best way to delete such file after the user has viewed the file or it has disconnected. The way that i have solved for now is to delete any file that is X hours old. What i would like to do is if the user leaves the page, delete the file. Or if the user logout, delete the file. Or if the user looses connection, delete the file.

13 Sep
3 months ago

dan3460 left a reply on Method Not Allowed, But Is There

I feel stupid!!! you are complete right.

Time to go for a drink!!

Thank you sir,

dan3460 started a new conversation Method Not Allowed, But Is There

Normally i get this type of error when trying to hit as route because of misspelling or the method is the wrong one. I have been stuck on this one for more than an hour and i do not understand what is going on. Here is the section where i set up the route:

Route::get('/tables/languageNew', '[email protected]');
Route::post('/tables/languageNew', '[email protected]');
Route::get('/tables/languageEdit/{languageID)', '[email protected]');
Route::put('/tables/languageEdit/{languageID}', '[email protected]');
Route::delete('/tables/language/{languageID}', '[email protected]');

here is the call to the route:

                            <td class="d-flex justify-content-between">
                                <a href="/tables/languageEdit/{{$language->language_id}}" class="btn btn-sm btn-info">Edit</a>
                                <form action="/tables/language/{{$language->language_id}}" method="POST">
                                    @csrf @method('delete')
                                    <button type="submit" class="btn btn-sm btn-danger">Delete</button>
                                </form>
                            </td>

I'm calling the edit between the a tags.

and here are the headers from Chrome tools:

Request URL: http://127.0.0.1:8000/tables/languageEdit/2
Request Method: GET
Status Code: 405 Method Not Allowed
Remote Address: 127.0.0.1:8000
Referrer Policy: no-referrer-when-downgrade

What i'm not seeing? Thanks for the help,

11 Sep
3 months ago

dan3460 left a reply on Reading The Upload % Of A File.

I'm not using axios. I think!. On the controller i grab the file name and use the following to upload the file:

$request->file("filename")->store('folderName");

With that there is a % shown on the bottom left of the browser showing the progress of the upload.

10 Sep
3 months ago

dan3460 started a new conversation Reading The Upload % Of A File.

When i upload files on the application that i'm building there is a % that shows up at the bottom left hand side of the window. How can i grab that number?

dan3460 left a reply on Update Table Depending On Selection

In case someone wants to know. I used datatables functionality to do this. I placed a select for the shippers. I created a function with JQuery that reads what has been selected and pass that value to the datatable.

09 Sep
3 months ago

dan3460 started a new conversation Update Table Depending On Selection

I'm creating a page that manages growers that belong to a shipper. At the top of the page is a select, then is a table that displays the growers that belong to the selected shipper. In the old application we used JQuery and Javascript to redraw the table after a selection. This time i'm using a JQuery Datatable extension to format and give functionality to the tables. Is there a function in Laravel that can do this more easily than a bunch of javascrip functions? I think Datatable has some of that functionality but i need to read more about it. Any ideas how to do this?

08 Sep
3 months ago

dan3460 left a reply on Massing $request To A Markdown

I just discovered my error, when assigning the the variable in the constructor i put a "$" on the $this key word.

Should be:

$this->request = $request;

dan3460 started a new conversation Massing $request To A Markdown

At the end of the function that creates a new user i'm passing the request to a mail object:

        $user->expire = $request->expire;
        $user->active = $request->active;
        $user->settings_id = $settings->settings_id;
        $user->save();

        Mail::to($user)->send(new SystemNewUser($request));

        return redirect('/systemUser/manager');

here is the mail object where i tried to capture the $request to pass to the markdown:

<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Http\Request;

class SystemNewUser extends Mailable
{
    use Queueable, SerializesModels;

    public $request;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(Request $request)
    {
        $this->$request = $request;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('mails.systemNewUser');
    }
}

I think i'm not seeing the $request at the markdown level, printing the first name of the user $request->first generates an error of variable not fund. I used the same variable when creating the user and that works fine. I hope i explained ok.

03 Sep
3 months ago

dan3460 left a reply on Displaying A File On The Browser That Is Under The Storage Folder

Starting to remember the problem that we have the first time. When you use the download function it just download the file. In chrome shows on the bottom of the page where you can click and will open on a new tab. That is not the behavior that we are looking for. When the user clicks on the view button, we want the document to show up on the same page on a little iframe. To be able to push something on a iframe has to be publicly available, i think. That is why we grabbed a copy and put it on a temporary file under the public folder.

dan3460 started a new conversation Displaying A File On The Browser That Is Under The Storage Folder

I'm revamping an application that stores and display pdf files. When a file is uploaded is store under the storage folder which is not accessible from the browser. That is good. In the old application when an authenticated user wanted to see the file, we made a copy to a temporary folder under the public folder, from where it was uploaded to a . After reading the temporary file was deleted.

Is there another way to do this? I was reading about a function Storage::setVisibility, maybe i thought you can turn the visibility on and off to allow for the browser to read the file. But i don't know if that would work.

01 Sep
3 months ago

dan3460 left a reply on Company Change At Nav Level

Thanks for the answer, that is exactly what i was looking for. I'm revamping an old application so i'm limited on the name of the columns. The only table on the data base that has 'id' for the index is the users table. All other tables has "tableName_id" as the index. The assignment table looks like this:

assignment_id
id  <<-- the user
company_id

There are some other information fields that are not important for this example.

Thank you again

31 Aug
3 months ago

dan3460 started a new conversation Company Change At Nav Level

I have users that can enter information for different companies on a application. So i put a dropdown at the nav level which can be filled (foreach loop) from the controller that calls the index.blade, with something like this:

$companies = Assignment::where('id',Auth::user()->id)->get()

return view(user.index, compact('companies')

I have not tried it yet, but i think it should work. My question is: every time that i call a new view i will have to add the $companies and pass that to the view. Is there like a global way to do this?

29 Aug
3 months ago

dan3460 left a reply on Bootstrap Behaves Different From Developing And Testing Web Site

Thanks for the help. Last time that i worked on the system i had setup git to ignore some files, why? i don't know. fixed the git ignore and now is working.

dan3460 started a new conversation Bootstrap Behaves Different From Developing And Testing Web Site

Working on a project that and using Bootstrap. On my desktop computer, windows 10 and using serve, the drop down menu opens on a floating box. On the testing site, Ubuntu and Nginx, the whole area of the menu expands to accommodate the drop down, pushing everything down. I'm using git to push to testing, i have cleared the site and cleared the repository in the Ubuntu machine, but i still have the same behavior. Thanks for the help

26 Aug
3 months ago

dan3460 left a reply on Deleting A Record After Working With It

Hummm... I went back to the first example and .... it worked !?!?

I don't know what i did wrong the first time, maybe didn't realized that i didn't actually grabbed a record. I'm still working on the database adding records and and keys.

Sorry

dan3460 started a new conversation Deleting A Record After Working With It

I have a function to delete a record on a controller, but before i delete the record i want to get some information from it, for example the user that created the record so i can fire an email let him/her know. ''' $entityRequest = EntityRequest::where('entity_id',$request->entityID)->first();

    Mail::to($entityRequest->owner)->send(new RequestNotification($request->note)); 

$entityRequest->delete();

''' of course i'm getting an error on the last statement. I circumvented this by doing this, but it looks horrible and probably bending rules for coding in Laravel: ''' $entityRequest = EntityRequest::where('entity_id',$request->entityID)->first();

    Mail::to($entityRequest->owner)->send(new RequestNotification($request->note));  // Sending message before instance despairs

    $recordDelete = EntityRequest::where('entity_id',$request->entityID);
    $recordDelete->delete();

''' is there a more elegant way to do this?

12 Aug
4 months ago

dan3460 started a new conversation VSC Git Cannot Push After Password Change

I recently change my password in GitHub. I can push from the command line, but the built in source control in VSC seems to have the old password. I have looked around and i cannot find the way to fix it. It is not a big problem but it was nice to be able to push from within VSC.

Thanks

05 Aug
4 months ago

dan3460 started a new conversation Chatter App Just For Members

As anyone used the chatter app for forums? I would like to use the app on a web site for a chess club, but the forum should be visible and available on to members of the club. I don't understand how it route request to /forum. Any ideas?

01 Aug
4 months ago

dan3460 started a new conversation Jeremy Kennedy Users Management App

I played with the package above on a test laravel app and seems to work fine, i actually like it very much. My question relates to modification to the create and edit users. The user table contains many more fields than name and email. I have first, last, address, etc, etc. I can go into the views and change the things that i need to make it work with my needs. But it seems, correct me if i'm wrong, that the controller resides under the vendor folder, which is not copied when using git. Is the solution just moving that controller over the app folder and change some of the files? What it will be the correct way to modify the package so i can make changes on it.

31 Jul
4 months ago

dan3460 left a reply on No Rendering On Internet Explorer

I did look there and said that is compatible with IE10. In this case i don't have good compatibility from IE 8 and up. This is not for a large enterprise, is just a chess club, but i know that several of the members only use explorer. BTW Microsoft edge works fine. I was wondering if it is there anything that i can do on my software to provide with compatibility.

dan3460 started a new conversation No Rendering On Internet Explorer

Working on a chess club web site i ask one of the member to check the skeleton that i have. He said that is was all mangled. On my Chrome the site looks fine, but on any Explorer it just doesn't work. On IE 8 pictures don't look right, on 9 pictures are at the correct scale but columns are on top of each other. 10 and 11 it is all pushed to one side. I'm using bootstrap 4, so the page is arranged in rows and columns. Is there something that i can do to have compatibility, or should i tell my audience to use Chrome?

dan3460 left a reply on Cannot Connect To Database

Stupid me!!! I was able to access the database. I shut down artisan serve and run it again, now it works. Maybe i started serve before i did the migration and the application did not have the new .env setup? Sorry to bother

dan3460 left a reply on Cannot Connect To Database

I checked the database and i cannot find the problem. This is a database that resides on the cloud, i have several schema on that database. I fire up another application, from my development computer, that use a schema on that database and it worked fine. The only difference between this two applications is the name of the schema.

dan3460 left a reply on Cannot Connect To Database

Brilliant!!, i think you are correct, I'll check that.

dan3460 started a new conversation Cannot Connect To Database

It has bees several months that i have not worked with Laravel. I'm starting a new project and i got stuck with this problem. New clean installation of Laravel Run auth setup the .env with db credentials run migrate, no problems. All fields are created on the database. try to register on the new laravel, get a [2002]No connection could be made because the target machine actively refused it.

I don't think i had this problem before.

Thanks for the help

04 Apr
8 months ago

dan3460 left a reply on Model Not Bringing HasOne Table

Solve the issue, got to learn more about that. What is the third parameter for?

dan3460 left a reply on Model Not Bringing HasOne Table

I did what you suggested and i can see that the request to the database is incorrect:

select * from `season` where `season`.`season_id` = '1' and `season`.`season_id` is not null limit 1

is calling for season to be 1 and there is no season 1, the season should be 12. The next field in the growerProgram is the grower and that one is 1. Is it possible that the sequence of the fields got scrambled in the model and need to be reset?

dan3460 left a reply on Model Not Bringing HasOne Table

i thought so but i checked , don't understand why. If i do this:

select a.season_name from growerProgram s join season a on s.season_id=a.season_id

returns the correct value. I'm pretty sure that im doing something wrong but don't know what.