Member Since 2 Years Ago
4,130 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Well as you guy mentored it depends on requirements and as long as the integrity of the data is taken care by the app avoiding foreign keys should be the way to go. Also, speed access is not determine by the foreign key but by the indexes in the table. If we are talking about millions kg records depending on the requirement or business rule the table could have a primary index and Simenon others.
What is your take regarding speed / performance and primary key and indexes.
So, should the above line be kept in the migration file?
I have seen on tutorials people declaring the foreign key on one to many scenarios and others do not use it. Which is the way to go? Should we always use the foreing key definition, for example:
and second question, how to reference the model class in the relationship:
return $this->hasMany('App\Comment'); This one return $this->hasMany(Comment::class); Or this one
Opulido left a reply on One To Many - Inverse - Form Select Class Component
Thank you. The currency has only the Name,Code and Enabled attributes.
Opulido started a new conversation One To Many - Inverse - Form Select Class Component
Hi. I have the following relations in the app I am working on. I have a Bank model or Component as well as Bank Accounts and Currencies. The relation is very simple here. We can have several banks and each bank has multiple bank accounts. Each account has one currency type. Currencies are created with just the name, code and enabled fields (and the classic id and timestamp field). My question is related to the currency type. For a bank account this is not like an ownership type of relationship but more like a configuration parameter. Still, a bank account will have one currency type (belongs to) and a currency could have many bank accounts associated to it. So, even that for me this is a configuration parameter rather than a relationship, I have created the eloquent relationship. Is this the right way to go here?
Also, when I create a new bank account, I need to get all the currency types in order to populate the select component in the blade file. For this, even that the relationship between bankaccount and currency exist (on thinker I can get App\Model\backend\bankaccount::find(1)->currency and App\Model\backend\currency::find(2)->bankaccounts) there is no way to get all the currency types configured (populated in the DB). So in the bankaccount controller in the create method, I do the following: ... $currencies = \App\Model\backend\currency::all(); return view('backend.bankaccount.create',compact('currencies'));
Then on the create.blade.php I simply do:
Is this the way to do so because even that I have the relationship, when creating a new bank account, trough that relationship I can not get all the available currencies configured from the bankaccount model right?
Thank you. I have been looking for a tutorial or a video that explains in detailed how to create an admin panel and how to add components to it abd the users panel etc. I am able to find piece of information.
For what I understand, an admin panel like AdminLTE or Gentelella helps you create the design for all the pages that will be available on your app, that is creating a page that contains graphs and tables and pieces of information, that is designing the views. Then one can add the vide to provide the data for those components.
Any more comments will be appreciated
I did a fresh install of Laravel 5.5 and ran the composer command to get the adminlte installed.
@ejdelmonico , I am still getting the Laravel basic home page. Do I need to add auth to it?
Thank you! Will that be the same procedure for the Gentelella Theme, I mean, using composer?
I just installed the Laravel Boilerplate from laravel-boilerplate.com by Anthony Rappa which installs a stripped down version of the AdminLTE theme. How can I installed the full version of the theme so that I can see all the components and use them.
I have the need of an app which need to have to following functionality:
I know it is a lot to ask and that there are videos for some pieces as well as packages developed by other people.
Is there something that I can take as the main shell or skeleton for te app and then start modifying it? Is there someone who will like to guide me more closely into this process?
I really appreciate any help.
Solved. The Akaunting app based folder was not .../Akaunting/public but just .../public. So I modified the root parameter within the virtual server config file to:
#root "/home/vagrant/Code/Akaunting/public"; root "/home/vagrant/Code/Akaunting";
I created a second project in order to test the Akaunting app ( https://akaunting.com/docs/installation ). What I did first was to create a second laravel project as you normaly do. I was able to use my browser to access that new app and I was getting the Laravel page.
Then I rename that new app folder within the /home/vagrant/Code folder and created a new folder with the same name and unzip the files from the Akaunting zip file into that folder.
If I access this new app I am getting a 403 folder error. In the app log file I am getting this:
2017/09/30 02:50:10 [error] 2265#2265: *3 directory index of "/home/vagrant/Code /Akaunting/public/" is forbidden, client: 192.168.10.1, server: akaunting.app, r equest: "GET / HTTP/1.1", host: "akaunting.app"
If I rename the folder to something else, and rename the initial laravel folder to Akaunting, I get the Laravel page displayed.
I agree with you SCC. Maybe a good example / tutorial on creating a users panel will help me accomplishing this without depending on a 3rd party solution. Any ideas where I can get a sort of step by step process on building a user panel?
Hi there. I am working (before coding) on the design of an app which after the users login page, it should land into a panel similar to the gentelella admin panel. It will not be an admin panel but a users panel which should have on the left side the menu options / sections for different actions such as Reports, Daily /Weekly Data Entry, Forecast, etc. As I understand, an admin panel is designed to configure user access, permission, parameters for the app, etc. The Gentelella panel is similar to what I want to acomplish but for the user actions.
What do you recommend, a build my own user panel or use a panel like Gentelella but adjust it to be the users panel and not the admin panel.
@jlrdw how do I protect the code so that no one can open a PHP file and read it? Just with pure VM Unix permission?
Jlrdw, I definitely agree with you. If I don't kick the box out of the way I may go with the VM solution but I will have to some how encrypt the code. ODBC and a VBA app for form showing and data capturing is probably simple but if the web app will be developed, having in local then no other development but again, I will have to encrypt or do something with the PHP code.
Let me re-define the issue here. The app will manage all the information for the operation of farms. We have farms that are close enough to "civilization" or that telecommunication is affordable. These farms have an admin office where the person in charge captures the daily data. So the information will be capture in the main app using their internet connection. Unfortunately, there are a few farms that do not have and will not have internet access because they are located far away where even a telecom tower will not work and satellite dish communication is very costly.
Currently, there is a section coordinator responsible for a group of farms and he picks up lots of paper forms filled by every farm administrator. The coordinators bring the paper forms to the main corporate office where a couple of guys capture the data in a system (which by the way is obsolete).
So the idea is that the app on those uncommunicated farms will be exported into a file in a USB stick and then brought up to the main office where they can be uploaded into the main app. The other farms with connectivity will work directly with the main app.
I hope this is better. Thank you all
Some of the remote locations are on villages where Internet is not present. The data will travel to main by a USB stick. So the idea is for them to have on a local pc the app or parts of the app with the export data option so that the files can be placed on the USB stick and then brought to the main central office where they can upload the data. Some other locations have internet access so they will be able to work directly with the main web app. Installing on a local server or having a VM running in the back is fine but then the code has to be encripted some how so that the can not modify it or use it for something else.
I have the need to work on an app where the users in some scenarios do not have internet access. The main app will reside somewhere in the cloud therefore accessible when having internet access but there are locations that do not have internet access (believe it!). On these locations, the users will need to have the same functionality and a way to export the data in order to uploaded to the main app database and integrate their data into the main database. You may ask, why there is no internet. The need of an app is on remote locations where communication is bad but still there is a need to have an app to capture and administer operations of the business locally and also be able to have the info integrated into the main app. Finally, the local app code can not or should not be seen by the users.
Is there a way to do this with Laravel?
That's is what I think as well. The question now will be, is there a deployment mechanism that packages everything together in order to upload or move all the needed files or I need to install Laravel on the server as I did on my local machine?
Do I need to install Laravel on a local computer to develop an application and later deploy it to a server with apache and PHP or the installation is on tbe web server where I can work on the development version before deploying it right there? It is not clear for me.
Thank you so much for the answers! Maybe I have not gotten that far on the videos. Also, is there a step by step or workflow defined it order of actions recommended to build an app with Laravel? Something like first create the main page and secondary pages, then add session control, then permissions, etc
It has been a while since my last web app development where I used to code everything using plain PHP and coding everything from scratch (session control, user access and App and DB permissions, connecting to a DB and designing the queries).
Is Laravel the way to go to speed up the development time over a well tested and proven framework? Can I have control over the types of queries I need. The web app o need to create will have a relational DB with lots of tables with a lot of relations. Is it possible to define queries in order to use primary keys or indexes in order to optimize the query path and response time? The DB will have a lot of tables containing thousands and millions of records.
I hope you guys can guide me on this before I start doing it all from scratch.