Script47 Posted April 29, 2015 Share Posted April 29, 2015 Because that's the way Eloquent is intended to be used. However for example, if it would update on each reference... What if you wanted to do more than one adjustment? That could be multiple queries! So why do more, when less is good? Ah, I've never used Laravel or Eloquent, hence the confusion. Your thread did spike some interest in Laravel for me. The installation was damn hard. xD Quote Link to comment Share on other sites More sharing options...
krballard94 Posted April 29, 2015 Author Share Posted April 29, 2015 I really do like Laravel, alot! Composer makes the installation really easy, even to bring outside packages. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 2, 2015 Share Posted May 2, 2015 Ah, I've never used Laravel or Eloquent, hence the confusion. Your thread did spike some interest in Laravel for me. The installation was damn hard. xD Laravel installation? What was hard about it O_O last I checked all you had to do was laravel new PROJECT_NAME - - - Updated - - - I really do like Laravel, alot! Composer makes the installation really easy, even to bring outside packages. Composer is ace, it not only handles the packages but also can handle the autoload in which laravel takes advantage of. Bower is the like for the frontend too. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 2, 2015 Author Share Posted May 2, 2015 Laravel installation? What was hard about it O_O last I checked all you had to do was laravel new PROJECT_NAME My only guess would be trying to install Homestead on Windows... I'm not using Homestead personally, it seems to much effort to install it. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 2, 2015 Share Posted May 2, 2015 My only guess would be trying to install Homestead on Windows... I'm not using Homestead personally, it seems to much effort to install it. Never used it either, not seen the need for it as it doesn't mirror my server at all anyway... Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 2, 2015 Author Share Posted May 2, 2015 I personally didn't find the need for it. I'm quite happen doing my local development on XAMPP. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 17, 2015 Author Share Posted May 17, 2015 Just a quick update, I have a fully functional permission based access layer with roles included with an admin side. This is including adding new permissions, roles and users while being able to attach and detach permissions to roles and giving a user a role. I'm just wondering now what people would like a core features? Remembering it's only an engine and not a game. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 17, 2015 Share Posted May 17, 2015 (edited) I would like to have a book feature of some sort that can tap into other features/modules. This way if/when it does take off and people develop modules, you won't have to go and edit existing code to get the plugin to work. Keep in mind in not familiar with laravel at all so I don't know if they have something like this built in. Maybe make some sort of method that is registered automatically like a magic method that you can call in your controller(s) that becomes global. For example like for registration you can add something like: $this->hook->run->registration("some_method"); And it will search files/controllers for a method called registration_some_method(). I don't know if that will work but maybe you get the idea Edited May 17, 2015 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
Coly010 Posted May 17, 2015 Share Posted May 17, 2015 This way if/when it does take off and people develop modules, you won't have to go and edit existing code to get the plugin to work. I don't know how possible this will ever be, as the view files would need to be edited to add the new links that make users able to use the plugin etc, unless there is a way to setup dynamic view files. This is probably gonna sound so confusing because well I'm thinking it up on the spot. Gonna refer to mccodes as most of us know how the files generally look. Ok, so take the explore.php file from mccodes. When rendered its basically a table split into three columns with a bunch of links in them. What I'm suggesting is to create a unique identifier for each of these <td></td> 's. Something maybe like this: <td valign='top' data-view-identifier='explore_top_left'></td> And not only here on the eplore.php page but say the mainmenu as well, basically anywhere where devs put links to plugins that users can use. Then each plugin could have a file which stores the links it needs and where to place them, some pseudo code: Add link to explore_top_left : <a href='link_to_page'>Some Link</a> All of these types of file are identified and all the links are added to the relevant place on the site. Has that made any sense? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 17, 2015 Share Posted May 17, 2015 Eh, kind of. If what I'm thinking in my head is accurate it may work. Like I said I never used laravel and have only used CI, so if a hook method could be created to loop through these for lack of a better term magic methods I think we can be in business. For example, let's make believe that we have the hooks created to loop through all books like I stated above shall we?: //I am referencing the way to do it on CI through the controller $data = array( 'some_content' => $this->model->some_method(), 'hooks' => $this->hook->run->register('some_method') ); $this->load->view('some_view',$data,true); Now for the view: <div><?php echo $hooks; ?></div> // or instead of looping in the controller for the hook: <div> <?php foreach($hooks as $hook) { echo $hook; } </div> The only thing would be to get module developers to allow for hooks in their controllers and to get the hook class to register the hooks. And also maybe make a property called enabled which accepts a booleon and if it's set to false the hook is disabled. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 17, 2015 Author Share Posted May 17, 2015 Eh, kind of. If what I'm thinking in my head is accurate it may work. Like I said I never used laravel and have only used CI, so if a hook method could be created to loop through these for lack of a better term magic methods I think we can be in business. For example, let's make believe that we have the hooks created to loop through all books like I stated above shall we?: //I am referencing the way to do it on CI through the controller $data = array( 'some_content' => $this->model->some_method(), 'hooks' => $this->hook->run->register('some_method') ); $this->load->view('some_view',$data,true); Now for the view: <div><?php echo $hooks; ?></div> // or instead of looping in the controller for the hook: <div> <?php foreach($hooks as $hook) { echo $hook; } </div> The only thing would be to get module developers to allow for hooks in their controllers and to get the hook class to register the hooks. And also maybe make a property called enabled which accepts a booleon and if it's set to false the hook is disabled. I'm not entirely sure, so I'll take a look into CodeIgniter's hooks tomorrow.. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 17, 2015 Share Posted May 17, 2015 I don't believe codeigniter has a hook system. I we just using it as an example because it's the only example of that I can think of off the top of my head. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 18, 2015 Author Share Posted May 18, 2015 I don't believe codeigniter has a hook system. I we just using it as an example because it's the only example of that I can think of off the top of my head. I see. At the moment I'm currently implement a more modular structure to the engine. All the core files will end up in the app folder, where as new modifications will end up being in the modules/ModificationName folder Quote Link to comment Share on other sites More sharing options...
Coly010 Posted May 18, 2015 Share Posted May 18, 2015 yeah I like that approach because I think it's easier then to plug mods in. I'll soon be starting work on a nodejs engine, it'll have the same setup. Main setup: /core/core.route.js - basically the controller /core/views/filename.view.ejs - view files /core/model/filename.model.js - game/app logic Module Set Up: /module/modulename/modulename.route.js /module/modulename/views/filename.view.ejs /module/modulename/model/filename.model.js It seems a nice way to do it imo Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 18, 2015 Author Share Posted May 18, 2015 Exactly, and I'm trying to make it create the modification structure via a form while validating the mod name hasn't been used already within the app. Quote Link to comment Share on other sites More sharing options...
Coly010 Posted May 18, 2015 Share Posted May 18, 2015 if the mod name is already used, how will you handle it? generate an extra character or string of characters. or just say there is a conflict? Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 18, 2015 Author Share Posted May 18, 2015 (edited) if the mod name is already used, how will you handle it? generate an extra character or string of characters. or just say there is a conflict? Just say there is a conflict, although I had to create a whole new validation method for what I needed! (Laravel's unique is database only, where I needed it to check an array!) Now time to try and sort out to install modules. Edited May 18, 2015 by krballard94 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 19, 2015 Share Posted May 19, 2015 Exactly, and I'm trying to make it create the modification structure via a form while validating the mod name hasn't been used already within the app. Use namespaces, use composer, make it so authors must register it with composer, then you can just do composer require etc. Optionally create a new namespace Modules\Author\Mod Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 23, 2015 Author Share Posted May 23, 2015 Use namespaces, use composer, make it so authors must register it with composer, then you can just do composer require etc. Surely that would end up in the vendors directory? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2015 Share Posted May 23, 2015 Surely that would end up in the vendors directory? And what is wrong with that? It's where all the 3rd party libraries ago. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 23, 2015 Author Share Posted May 23, 2015 And what is wrong with that? It's where all the 3rd party libraries ago. I rather your second option what you said, creating a new namespace. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2015 Share Posted May 23, 2015 I rather your second option what you said, creating a new namespace. Huh? I don't get that at all. Quote Link to comment Share on other sites More sharing options...
krballard94 Posted May 23, 2015 Author Share Posted May 23, 2015 Huh? I don't get that at all. What I mean, I'm still going to go with the original folder stucture. modules/ AuthorOne/ ModOne/ ModTwo/ AuthorTwo/ ModOne/ AuthorThree/ ModOne/ And use the namespace Modules/AuthorOne/ModTwo Quote Link to comment Share on other sites More sharing options...
Guest Posted May 23, 2015 Share Posted May 23, 2015 What I mean, I'm still going to go with the original folder stucture. modules/ AuthorOne/ ModOne/ ModTwo/ AuthorTwo/ ModOne/ AuthorThree/ ModOne/ And use the namespace Modules/AuthorOne/ModTwo Hmm, still possible with composer. But either or :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.