Ok i found in other questions in stackoverflow, that artist bundles are not good any more, that you may use composer. but i cant install juploader.
php artisan bundle:install juploader
USING this trhow:
[InvalidArgumentException]
There are no commands defined in the "bundle" namespace.
http://bundles.laravel.com/bundle/juploader
is this really necesary or i just need to insert the next line in bundle.php (creating one?)
'juploader' => array('handles' => 'upload'),
I need to install juploader, or the best jquery upload file for laravel, that make life easy, XD jaja not more complicated. in the past juploader was easy to install, but im afraid is out of date now.
How can i install this, or maybe there is a newer one that works like charm on 4.1 laravel?
Related
I'm working with multiple projects, each one separated from the others in my server. So my problem is that I have a Core project that have all the functions I need, and in Laravel projects it's annoying to copy/paste everything every time. I was thinking to create a package and install it in all my Laravel projects via composer, but it bothers me the fact that every time I want to add a feature or perform a minor bug fix, I will have to do a composer update in every project (I have more than 20 actually).
I just came up with some ideas, let me know what do you think about it and if you will use some different idea:
Create a Model/Class that includes my main php core library directly from the server (Remember that I have all the projects in the same server). I will just need to call the Model/class and it will import all the functions. I will just need to keep updated the main library code every time I perform a minor bug fix or any new implementation.
Create a package where inside will have all code I could need to use in all projects (main library). This would be perfect, since I want just use the composer install command get the package installed in my project. I'm not concerned at all with this solution, because I have more than 20 diferent projects and I will need to do more than 20 composer update every time I perform a minor bug fix or new implementation.
The last one is to do a generic composer where it contains all the packages I would need (almost all the projects use the same composer.json) and create a symlink between all the projects. I will install the packages in one folder and keep that updated everytime I perform some new task, and the symlink will keep the folders updated in every project.
What do you think about that options? I think I will go for the 3rd one, but wanna know your opinions or if you have the same problem and works with other solutions.
Or you could create a bash script that runs composer update for all of your projects.
#!/bin/bash
cd /var/www/website.com && composer update package/name
cd /var/www/website2.com && composer update package/name
cd /var/www/website3.com && composer update package/name
I have to update CakePHP from current, outdated version (2.7.7) to latest on 2 branch, because of PHP7 support.
While I've done numerous framework upgrades before, I found book.cakephp.org a more than a cryptic about key things which I ask here:
can it be done by replacing directoris
which directories are intended to be replaced (never edit dirs, like system in Codeigniter)
which directories are partially replaced if any
is there SQL commands that should be run?
is there other commands that should be run?
Any clue is appreciated, but 2 and 3 are of most value I guess. Thanks in advance.
Depending on how you've installed CakePHP, you either use composer to update the CakePHP core dependency:
$ composer update
or require a specific constraint/version if your current constraint doesn't allow upgrading:
$ composer require cakephp/cakephp:^2.10.3
If you're not using composer (I'd suggest to switch to using it), then you download the latest release package manually, and completely replace the /lib/Cake directory. With respect to the core, the upgrade is then complete.
Then read the migration guides to figure the possible changes that you have to apply to your application code or database schemas, and also compare the "application template" changes (/app/) to your local application and apply changes in case necessary. After this, run your test suite to ensure that everything works as expected.
With that being said, the upgrade from 2.7 to the latest 2.10 should be pretty easy, as it is said to be fully API compatible.
I recommend you to use composer to manage your framework and extensions.
With composer installed, it would be much easier to update. If you decide to use composer, let me know if you need any more help by installation, setup or update.
Background
I am new to the Laravel Package.
In my Laravel application I usually run the following command in order to install Bican Rokes, change the config files, etc...
php artisan make:auth
php artisan migrate
Objective
However, this process is tedious, so I was wondering if it is possible to create a package capable of automatizing the process.
What I tried
To achieve this I read the Laravel documentation, which teaches how to create packages, but I was unable to understand if this is possible and if it yes, how it should be done.
Questions
Can a package be used to automate this behaviour?
If yes, can you provide it?
If not, can you explain to me what a package really is? (links to tutorials are welcome)
If I cannot use a package, is there any other way of doing this?
I am not pushing the sale of anything, nor do I know this guy. But this tutorial is a pretty good starting point for laravel.
Laravel Tutorial Series
if a separate package should be created or not will depend on volume of work you want to accomplish. a starting point can be a custom console command, and from with-in that command, you can call multiple other commands.. And from their you can extend it to do other things like editing files etc. If you don't know how to write a console command in Laravel, here is the link to docs: https://laravel.com/docs/5.2/artisan#writing-commands
I wonder if someone can help me. I've been handed in a Cake PHP app that I need to 1) add minor changes 2) deploy. I've never really worked with Cake before and was wondering whether do I need to anything in order for it to work?
For instance, With a Node app, you need to install modules npm install. With a Rails app you'll likely need to install the gems bundle install.
Is there something similar with Cake? I've set the localhost server, but when I try to access the url I get all sort of errors. Some I've fixed (missing environment settings which I just override the Redis host and port). The latest one is:
{
"exception":{
"class":"MissingControllerException",
"code":404,
"message":"Controller class Controller could not be found.",
"file":"\/Library\/WebServer\/Documents\/php\/oompbe\/vendors\/cakephp\/lib\/Cake\/Routing\/Dispatcher.php",
"line":154,
"trace":[
"#0 \.../app\/webroot\/index.php(109): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))",
"#1 {main}"
]
}
}
PS: What's up with all the crazy \/\/?
PPS: Can I find out the version Cake I'm running?
CakePHP is just php. As most properly done php apps these days it comes with composer. I recommend you to read at least the basics of it's manual. Composer is an awesome tool.
git clone <repo>
cd <reponame>
composer install
If you start a new Cake application the official documentation tells you how to this as well:
composer create-project --prefer-dist cakephp/app [app_name]
If you want to automate things further composer provides you callback scripts. They'll allow you to automate tasks, basically trigger commands, after different actions. This is pretty useful to build assets after a composer update for example. I recommend you to not put lots of commands into that section but instead have dedicated script files you trigger by the callbacks.
Can I find out the version Cake I'm running?
If installed via composer it is usually in vendor/cakephp/cakephp/version.txt. Check the content of that file.
I am simply trying to install a laravel bundle via the Artisan CLI using the latest Laravel 4 beta from github.
But when I try something like:
php artisan bundle:install bob
I'm confronted with
[InvalidArgumentException]
There are no commands defined in the "bundle" namespace.
I've had a look around online and can't seem to find a solution to this or even anyone else having similar problems for that matter.
Has anyone else experienced this error or any ideas on a solution?
If you're using Laravel 4 (which based on the tags for this question, you are) then bundles are no longer used.
Out with bundles, in with composer
Instead, Laravel 4 makes use of composer packages. It's kind of similar but at the same time very different in how it works. Here isn't the right place to explain all of composer, so check out the links below to find out more:
Getting started with Laravel 4
How to setup Laravel 4
Composer primer
Laravel 4 Generator
Now, since you were asking about bob, the closest equivalent for the bob bundle would probably be Jeffrey Ways generator package, which you can learn more about here: Laravel-4-Generators