dan3460

dan3460

Member Since 1 Year Ago

Haddon Hts

Experience Points
16,960
Total
Experience

3,040 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
119
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 4
16,960 XP
Nov
07
6 days ago
Activity icon

Replied to Morning Company News

I should have clarified, this is when they login on their desktops. Not in a web based application.

Activity icon

Started a new Conversation Morning Company News

This is not related to laravel but i know you guys are smarter that i. In our company we are looking to have something (a page, a background, popup) that is presented to the employee when he/she logs in. Something like a bulletin board that is presented to the employee. A few people in the company will have access to post but it should be the first thing that all employees in the company see when they start their shift.

Thanks

Sep
02
2 months ago
Activity icon

Replied to Wrong Character Display

thanks @snapey, that did it. Learn something new today.

Activity icon

Replied to Wrong Character Display

I'm not sure. If i open the original file in VSC and the encoding is UTF-8 i get this:

<TR><TD></TD><TD>25</TD><TD>1 </TD><TD>Alexander Sykes  (752)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>
<TR><TD></TD><TD>21</TD><TD>� </TD><TD>John Cornwell  (1271)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>

if i change the encoding to ISO-8859-1 i get this:

<TR><TD></TD><TD>25</TD><TD>1 </TD><TD>Alexander Sykes  (752)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>
<TR><TD></TD><TD>21</TD><TD>½ </TD><TD>John Cornwell  (1271)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>

I think is Nginx or PHP that is applying UTF-8 to display.

Activity icon

Started a new Conversation Wrong Character Display

I made a small web site for my local chess club and when displaying the results of the last round i'm getting an unknown character instead of the 1/2 symbol. The files that i display come directly from the USCF (US chess federation) and i store them as a blob on a mysql database. BTW the site is https://www.woodburychessclub.com the table can be seen at https://www.woodburychessclub.com/currentTournament

so far this is what i have done:

  • Changed the meta tag to charset="ISO-8859-1"
  • Changed the default_charset = "ISO-8859-1" in the php.ini file

If i look at the data using mysql workbench i see the 1/2 symbol, so its been lost either by Nginx or PHP. I'm guessing here, what do i know.

I think UTF-8 charset should be able to display 1/2 symbol, which i think is the default everywhere.

Thanks for the help.

Aug
25
2 months ago
Activity icon

Replied to Pagination Problem - Probably I'm Just Dumb

Thanks guys for the kind words, i'm taking them as kind :). To give some context and to prove that i'm not that dumb, i saw the error as soon i posted the question. i was giving the pagination function on a controller that didn't call the view where i needed the pagination.

Aug
24
2 months ago
Activity icon

Started a new Conversation Pagination Problem - Probably I'm Just Dumb

disregards

Aug
04
3 months ago
Activity icon

Replied to Are You Also New? Is Your .env Showing?

A couple of years ago i looked at one of those shared hosting solutions and indeed they want everything hanging from one entry point. My solution was to get my own hosting, for about $6/month i have a linux machine that i complete control. I'm running 4 different web sites there. I have another machine that i run mail-on-a-box for a mail server.

Jul
30
3 months ago
Activity icon

Replied to Github Security Alerts - Yarn

@snapey thanks, i just did.

Activity icon

Replied to Github Security Alerts - Yarn

ok, understand. Thanks very much.

Activity icon

Replied to Github Security Alerts - Yarn

I don't think, at least on the project that i got the security alert, that i ever used npm to install any package. After i create the laravel project i run npm install and then npm run-dev to compile scss and any js that i have modified. I normally use composer to install any packages that i may need for the project. So i'm a little confused (sorry if this is way basic), is there an "yarn run-dev" and one for production?

Activity icon

Replied to Github Security Alerts - Yarn

This is a stupid question but, i have never used yarn. I think the yarn.lock files is installed when i run npm install. I try to run yarn upgrade and the bash window could not find yarn. Do i have to install yarn too?

Activity icon

Started a new Conversation Github Security Alerts - Yarn

I'm trying to solve some security vulnerabilities that github is reviewing in my code. All the ones left are defined in yarn.lock file. How do i update the yarn.lock so the dependencies are up to date?

Jul
19
3 months ago
Activity icon

Replied to View()->share() Vs Compact()

I didn't mean to open a can of worms. It seems to me that in almost everything in life, there are mode than one way to skin a cat. My task is to learn more about view()->share().

Activity icon

Replied to View()->share() Vs Compact()

Thank, guys.

Activity icon

Replied to In Shared Hosting Environment, How To Hide .env File From Public?

That is correct, but you have to remember that the old websites "everything" was intended to be seen by the people browsing the site. I'm just guessing here but if you are using Laravel you are probably accessing a database and may be adding data and running procedures on that database. That requires a different level of security that in the old websites. If you look at the public folder in Laravel it almost have nothing, just a few files and the pictures you are showing in the site. Everything else is hidden to the public.

Activity icon

Replied to View()->share() Vs Compact()

Thanks, i understand. I see where you can easily get confused that you are calling for some data on a view that is coming from a buried function. One more question is i may: The OP of the thread had something like this

View::share('data', $data1);
View::share('otherData',$otherData);
.
.
.

return view('home);

That would not be different from:

return view('home',compact('data1','otherData');

Is this correct? as the share() occurred in the same function as the calling of the view.

Thanks again, learned something new today.

Activity icon

Started a new Conversation View()->share() Vs Compact()

@snapey had a comment on a discussion about a blade returning 1. He said that uses the share method to pass data to the view. I have been using the compact() function when i'm passing data to the view (for example a drop down). Are there significant differences between the two methods?

BTW this is the post: https://laracasts.com/discuss/channels/laravel/blade-echoing-returning-1

Jul
10
4 months ago
Activity icon

Replied to Lite CMS Package

@jlrdw That is exactly what i did and the ones i found are complete crm systems. If i understand correctly you build the site around it. It seems like an overkill for what i'm trying to do.

Activity icon

Started a new Conversation Lite CMS Package

Is there an lite CMS package out there? I'm working on a chess club website and i want to add a page that have the results of the current tournament. The person that will be updating this page has can barely use the email. All the CMS packages that i've seen are full blow applications. Is there something that i can use. BTW i have security in the site as i have a forum for the members. Thanks for the help.

Jun
22
4 months ago
Activity icon

Replied to Lavacharts Gauge Colors

@braunson endeed it seems to be just that.

Thanks for the post

Jun
21
4 months ago
Activity icon

Started a new Conversation Lavacharts Gauge Colors

Is anyone using Lavacharts? Do you know if it is possible to to have more that 3 colors on the face of a gauge chart? Thanks

Jun
02
5 months ago
Activity icon

Replied to Datatable Draw Not Updating Post Variable

After several hours of working on this thing i think i have the answer, Indeed it looks like that way that i was constructing the ajax call is the static method https://datatables.net/reference/option/ajax.data. To be able to manipulate the data section of the ajax function has to be declared with a closure in this way:

ajax: {
    url: '/getBatches',
    type: 'post',
    data: function(d){
        d._token = "{{csrf_token()}}",
        d.type = $("#type").val()
    }
},

Thanks

Activity icon

Replied to Datatable Draw Not Updating Post Variable

@bobbybouwmann made the following change at the data portion of the ajax call:

data: {
    _token: "{{csrf_token()}}",
    type: $("#type").children("option:selected").val()
}

It didn't changed the result. It seems to me that when the table is declared is burned in memory and the function draw() only calls for that in memory to reprocess. It doesn't read again the variables. I place the same question in the DataTables web site,

Activity icon

Replied to Datatable Draw Not Updating Post Variable

Here is. I thought that the value may not be passing correctly so i selected a one of them and returns the correct data.

<div class="form-group">
    <select class="form-control" name="type" id="type">
        <option value=0>Pending</option>
        <option value=1 selected>Posted</option>
        <option value=2>All</option>
    </select>
</div>
Jun
01
5 months ago
Activity icon

Started a new Conversation Datatable Draw Not Updating Post Variable

I'm using Yajra Datatables, I have a select that returns 0,1 or 2 and depending on that the datatable is populated. My problem is when changing the selection the "type" variable still the one on the first selection. In other words the type still 0 regardless of what was selected. The alert that i have in the change, shows the selection chaging, but the draw has the old data:

    $(document).ready(function(){
    var batchesTable = $('#batches').DataTable({
        processing: true,
        serverSide: true,
        ajax: {
            url: '/getBatches',
            type: 'post',
            data: {
                _token: "{{csrf_token()}}",
                type: $("#type").val()
            }
        },
        columns:[
            {data: 'id', name: 'id'},
            {data: 'name', name: 'name'},
            {data: 'debit', name: 'debit'},
            {data: 'credit', name: 'credit'},
            {data: 'updated', name: 'updated'},
            {data: 'posting', name: 'posting'},
            {data: 'action', name: 'action'}
        ]
    });

    $("#type").change(function(){
        alert($("#type").val());
        batchesTable.draw();
    });
})
May
25
5 months ago
Activity icon

Replied to Form With Sub-form With Multiple Lines

@bobbybouwmann . I did looked at some examples and got some ideas. I just didn't wanted for some one to say afterwards: "You should have used (i'm inventing a term here) @callOrderLines that display all the lines for the order"

Because i'm not a full time programmer it has happen to me before.

Thanks.

Activity icon

Started a new Conversation Form With Sub-form With Multiple Lines

I'm upgrading a web site that present the user with an order, that order can have one or more lines (different services to be performed) and each line (service) can have one or more activities. The site uses Javascrip and a series of ajax calls to the database to add, delete or update the lines and sub-lines. As every time that i work with Laravel is something new, is there anything out there that can do this? Thanks for the help

May
22
5 months ago
Activity icon

Replied to Resource Route Not Taking Parameter

@devfrey but do you know why only works with the singular?

Activity icon

Replied to Resource Route Not Taking Parameter

@devfrey Hummmm! that works. I was using the name that the boiler plate gave to the variable. I assumed that could be named anything why the plural would affect the functioning of the method?

Thanks for your help.

PD. I named the variable xxx and doesn't work. Interesting, intrigued.

Activity icon

Started a new Conversation Resource Route Not Taking Parameter

I have a weird problem that i don't know how to troubleshoot. I have a button with to edit an order, that hits the:

Route::resource('orders', 'OrdersController');

which goes to:

public function edit(Orders $orders)
{
    dd($orders);
    $customer = Customer::find($orders->customer_id);
    $equipments = Equipment::where('customer_id',$orders->customer_id)->get();
    $techs = User::where('tech',true)->get();

    return view('orders.edit', compact('orders','customer','equipments','techs'));
}

the dd there gives me an empty collection:

Orders {#1181 ▼
  #table: "orders"
  #connection: null
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #with: []
  #withCount: []
  #perPage: 15
  +exists: false
  +wasRecentlyCreated: false
  #attributes: []
  #original: []
  #changes: []
  #casts: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: []
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #fillable: []
  #guarded: array:1 [▶]
}

but if i do this:

Route::get('/orders/{order}/edit', function(Orders $order){
    dd($order);
});

returns the order:

Orders {#1188 ▼
  #table: "orders"
  #connection: "mysql"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #with: []
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:12 [▼
    "id" => 1
    "customer_id" => 32
    "equipment_id" => null
    "users_id" => null
    "date" => "2019-05-21 00:00:00"
    "update" => null
    "invoiced" => 0
    "notes" => null
    "warning" => null
    "created_by" => 1
    "created_at" => "2019-05-21 20:58:47"
    "updated_at" => "2019-05-21 20:58:47"
  ]
  #original: array:12 [▶]
  #changes: []
  #casts: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: []
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #fillable: []
  #guarded: array:1 [▶]
}

Where i can see what is being passed in the resource route?

May
21
5 months ago
Activity icon

Replied to VSC Blade Snippets Not Recognizing Blade.php

Found my problem, in the file association section i had:

    "files.associations": {
        "*.blade.php": "html",
        "*.tpl": "html",
        "*.php": "blade"
    },

I replace it with:

    "files.associations": {
        "*.blade.php": "blade",
        "*.tpl": "html"
    },

Don't know if this is correct but now everything is working.

Activity icon

Replied to VSC Blade Snippets Not Recognizing Blade.php

@yezawhein here is my settings.json, could be something there that is interfering with the autoselect lenguage?

 {
    "workbench.startupEditor": "newUntitledFile",
    "explorer.confirmDelete": false,
    "window.zoomLevel": -1,
    "git.enableSmartCommit": true,
    "cSpell.userWords": [
        "Khill",
        "Laravel",
        "accessorial",
        "describedby",
        "endauth",
        "endforeach",
        "endsection"
    ],
    "breadcrumbs.enabled": false,
    "terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
    "explorer.confirmDragAndDrop": false,
    "workbench.iconTheme": "material-icon-theme",
    "files.associations": {
        "*.blade.php": "html",
        "*.tpl": "html",
        "*.php": "blade"
    },
    "[html]": {},
    "emmet.triggerExpansionOnTab": true,
    "blade.format.enable": true,
    "emmet.includeLanguages": {
        "blade" : "html"
    }
}
May
20
5 months ago
Activity icon

Started a new Conversation VSC Blade Snippets Not Recognizing Blade.php

I have VSC installed at my home and work computer. Both installations are identical as far i can see. One of the extensions that i have in both is Laravel Blade Snippets by Winnie Lin. At my home computer when opening a Blade file it automatically recognizes a blade file. On my work computer i have to manually change in the bottom left corner from "html" to "Laravel Blade". I have google to exhaustion and haven't been able to get a solution. Is not crucial, is just annoying.

Thanks guys,

May
12
6 months ago
Activity icon

Replied to Charts Not Rendering

After several hours i found my problem.

$chart->labels('One','two','three');

Needs to be given as an array.

Activity icon

Replied to Charts Not Rendering

By reading the installation guide i think i needed to add the following:

<script>
    {!! $chart1->script()!!}
</script>

Now i get all kind of errors. At Artisan serve:

[Sun May 12 08:15:16 2019] PHP Fatal error:  Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: array
_walk_recursive() expects parameter 1 to be array, string given (View: C:\Users\Tony\Documents\Software\Test\test\vendor\consoletv
s\charts\src\Views\chartjs\script.blade.php) in C:\Users\Tony\Documents\Software\Test\test\storage\framework\viewsa165dbafd0838
f428939fa5fab9e0cea779a2c.php on line 0

On the developer console i see the internal server error followed by 29 errors which i think derive from the first error.

Activity icon

Replied to Charts Not Rendering

I started early this morning trying to solve this problem. I went to Charts.js, as i'm using that type of charts, and copy the sample on their usage page. That works. So now on my welcome page a have the waiting circle and the graph from the Charts.js below, this tells me that there is something that is not been rendered when using consoletv/charts. I'll keep looking.

May
11
6 months ago
Activity icon

Started a new Conversation Charts Not Rendering

I need to put some charts on a web site. So i was testing on a new install to see how to use consoletvs/charts, which seems pretty powerful. I follow the instructions but only get a wait icon on the page. Here is what i have: my controller:


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Charts\TestChart;

class ChartController extends Controller
{
    public function index()
    {
        $chart = new TestChart;

        $chart->labels('One','two','three');
        $chart->dataset('First','line',[20,18,15,45]);

        return view('welcome',compact('chart'));
    }
}

The top of the welcome page:

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.js" charset="utf-8"></script>

and where the chart supposed to render:


            <div class="content">
                <div class="title m-b-md">
                    Laravel
                </div>
                {!!$chart->container()!!}


            </div>

I'm missing something else? Thanks for the help.