tuandm / laravue Goto Github PK
View Code? Open in Web Editor NEWAdmin dashboard for enterprise Laravel applications built by VueJS and Element UI https://laravue.dev
Home Page: https://laravue.dev
License: MIT License
Admin dashboard for enterprise Laravel applications built by VueJS and Element UI https://laravue.dev
Home Page: https://laravue.dev
License: MIT License
I am trying to implement a "Create" and "Edit" button that will open the desired page. I set the routes up the same as it is done in the admin routes file for articles/create and articles/edit. However, when I click on the button I get a 404 response. I am not seeing a route set up for articles/create yet it still works. Am I missing something here?
Here is my router module:
`import Layout from '@/layout';
const productsRoutes = {
path: '/products',
component: Layout,
redirect: '/products/catalog',
name: 'Products',
alwaysShow: true,
meta: {
title: 'Products',
icon: 'shopping',
permissions: ['view menu products'],
},
children: [
{
path: 'catalog',
component: () => import('@/views/products/List'),
name: 'Catalog',
meta: { title: 'Catalog', icon: 'list', noCache: true },
},
{
path: 'products/create',
component: () => import('@/views/products/Create'),
name: 'CreateProduct',
meta: { title: 'createProduct', icon: 'edit', permissions: ['manage products'] },
hidden: true,
},
{
path: 'products/edit/:id(\d+)',
component: () => import('@/views/products/Edit'),
name: 'EditProduct',
meta: { title: 'editProduct', noCache: true, permissions: ['manage products'] },
hidden: true,
},
],
};
export default productsRoutes;`
Here is the code for the button to open the page:
<router-link :to="'/products/edit/'+row.id"> <el-button type="primary" size="small" icon="el-icon-edit" v-permission="['manage products']"> Edit </el-button> </router-link>
Following the first steps I have a problem when doing the first migration
After doing: php artisan migrate --seed
I'm using SQL Server. Some tables are created succesfully but in the step "setup_role_permissions" I receive the following error:
PS C:\path\laravue> php artisan migrate:fresh --seed
Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrating: 2019_03_16_102314_add_simple_role_to_user_table
Migrated: 2019_03_16_102314_add_simple_role_to_user_table
Migrating: 2019_04_20_125200_create_permission_tables
Migrated: 2019_04_20_125200_create_permission_tables
Migrating: 2019_04_20_130706_setup_role_permissions
Illuminate\Database\QueryException : SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The object 'DF__users__role__20C1E124' is dependent on column 'role'. (SQL: alter table "users" drop column "role")
at C:\path\laravue\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The object 'DF__users__role__20C1E124' is dependent on column 'role'.")
C:\path\laravue\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458
2 PDOStatement::execute()
C:\path\laravue\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458
Please use the argument -v to see more details.
I have created an api route to get a list of items. I have added the route to the routes/api file. I added a method to my api/projects.js file. I then created a method on my index.vue file to get the data. However, it doesn't appear to be hitting my controller method at all. I keep getting this in response, "No query results for model [App\Laravue\Models\Product\Product] manufacturers". I have tested the query that is being used in the method and it returns data. I tried a dd() inside the method and nothing happened. It seems like it isn't hitting the method at all. Below is the code I have used.
index.vue
async getManufacturers() { const { data } = await productResource.manufacturers(); this.manufacturers = data; }
projects.js
manufacturers() { return request({ url: '/' + this.uri + '/manufacturers', method: 'get', }); }
api.php
Route::get('products/manufacturers', 'ProductController@manufacturers');
ProductController.php
public function manufacturers() { dd('Hello'); }
Am I missing something?
vue-element-admin,你这富文本编辑器的文档都和他一样,抄袭好歹改一改?
Not an issues - but where can we post questions?
A. Is there a blank starter without all the mock data and preset routes? If not what is safest way to strip out all pre-built routes etc?
B. The project is an SPA which loads the admin panel directly correct? What would be best option to route to a public front end that loads instead of the dashboard before the admin login? This way we can just link to the Dashboard login?
The documentation is great, thanks for hard work.
On the first time you run there should be error
RuntimeException No application encryption key has been specified.
We can use this to fix the error
php artisan key:generate
php artisan config:cache
Hello, after running npm run watch
on the host machine, what is the url of the front-end?
I tried http://localhost, http://localhost:8000 but not working.
Do you have documentation right now? Thanks!
First of all. Excelent Job!!!
I think my question will be covered in the docs. But I´ve been playing with laravue, I´d like to know wich is the best way to load data for selects to build a form. It´s not even a question directly related to laravue especifically, but I´d like your suggestion.
I found out, that the requests to the server api, are made from js files in the api folder. Do you think it would be better to make a js file to load all the information to use on the form, like form.js (loading select options, radio options all at once) ? The orther way would be creating related to the select itself like cities.js, to fill the cities select in the form?
I´m newbie in vue. Hope I´ve explained well my question. Sorry if it´s not the right place to discuss this kind of thing. Really thankfull for your work.
Before runing
php artisan migrate --seed
try adding Schema::defaultStringLength('191') to the AppServiceProvider, or you might face problems migrating.
Scss/css from Vue components are unable to extract along with app.css
Hi!
First, thanks a lot, is a great work you did here. I'm still doing some things to adapt to my needs but that is another matter.
Laravel 6.0 is out, and i would like to do things on that version, there is a near plan to support it?
Thanks!
hello
First of all. Excelent Job!!!
project is ok but then i copy in my project
Unable to locate Mix file: /js/vendor.js
The first.... AWESOME PROJECT AND WORK!
Just a question, where can I find documentation? Will be helpfully for create new pages or components.
Thanks!
How can i create user registration and login page easily so that each new register use listed as user role only?
http://laravue.cipherpols.com/#/icon/index
The current icons on laravue is a bit limited so I want to improve the quantities of it.
First of all, the admin panel looks fantastic! We've just started using Vue JS as SPA application on top of Laravel, so this looks perfect.
My question (and I'm not sure this is the right place to ask it), is when will this be packaged into a library, so that we don't have all the components and laravue code throughout the application.
I wanted to be able to use this for a project, but it'll be quite difficult to differentiate our code from laravue. Also, do you have any guidance/docs for how to create new pages, update the nav, etc, to get started? Thanks in advance.
I thought that issue is only for local version, but error in console you can see also https://laravue.dev.
Scripts, that was built by webpack, are not minified in my local version, and seems issue is related with ./node_modules/camelcase/index.js.
to be more accurate, this part
` const preserveCamelCase = string => {
let isLastCharLower = false;
let isLastCharUpper = false;
let isLastLastCharUpper = false;
for (let i = 0; i < string.length; i++) {
const character = string[i];
if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
string = string.slice(0, i) + '-' + string.slice(i);
isLastCharLower = false;
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = true;
i++;
} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
string = string.slice(0, i - 1) + '-' + string.slice(i - 1);
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = false;
isLastCharLower = true;
} else {
isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;
isLastLastCharUpper = isLastCharUpper;
isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;
}
}
return string;
};`
And seems issue is with const declaration.
I've have done some research, tried one on the babel plugins, but that doesn't work for me.
Screenshot from my local version
https://www.screencast.com/t/AtYN0vMfR
and from the demo, that you have hosted
https://www.screencast.com/t/LAXTXoqT2cfq
And navigating through error I'm getting to line
https://www.screencast.com/t/GuShyy70VSIm
Any solution, that you can suggest please ?
ENOENT: no such file or directory, open '/Users/newowner/laravue/node_modules/.staging/@types/jquery-fc08fbbe/JQueryStatic.d.ts'
npm ERR! Error while executing:
The project I have been looking for for a long time has finally appeared.
First of all, thank you very much for your contribution.
Especially users, role, permission and routing,example use the package of spatie/laravel-permission ? Because adding these is like a perfect system.I really hope that you can add these features.
Hello,
First thank you for the awesome work,
I noticed a small issue with the wave directive, If you go in administrator > Users tab, the waves directive isn't working, no error just no effect.
hello, I know that this in not an issue, but if i want to add new item in menu, or remove some one, which file I should edit?
I new how to create files and add them to route
thank you all :)
Hi, i wanna say thanks for amazing work and i have a question about do you have plan for add rtl support to this project b coz some language same Persian or Arabic need it.
Best Regards.
The app is beautiful, and it runs flawlessly on local. When deploying to Heroku it just returns a blank page. DB was seeded successfully. Error in the console is "Uncaught SyntaxError: Unexpected token <"
So im doing everything prior and I get this error when I run npm install
Tooling Versions: FF quantum 68.0.1, npm 6.9.0, composer 1.9.0, Laravel Framework 5.8.13.
When running php artisan migrate --seed I get this error.
If you like I can post the verbose output.
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)
at /root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("SQLSTATE[HY000] [2002] Connection refused")
/root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=homestead", "homestead", "secret", [])
/root/PROJECTS_RAND/vue_demos/vue_blog_demo/laravue/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
This issue prevents me from logging into the dashboard with the developer account and presents as a (500) invalid server error.
I have changed DB_HOST=127.0.0.1 to DB_HOST=localhost in the .env file [1] but this did not resolve my issue.
[1] https://stackoverflow.com/questions/43804784/database-laravel-php-artisan-migrate-connection-refused
Hello,
can you help plz?
npm run lint -- --fix
npm ERR! missing script: lint
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/stevanaleksic/.npm/_logs/2019-07-31T10_16_47_164Z-debug.log
Hello Bro ,
Thank you for perfect admin panel , it's really helpful .
i have question about roles and premissions please .
Where can i control role or premissions add - edit - delete ??
First of all I would like to congratulate you for the excellent work. I am studying it to put on a project person.
My question is regarding API authentication. I saw that you use "tymondesigns / jwt-auth". My question is why not use the laravel passport?
Sorry for my english, I'm using google translator.
Hi
Thank you for your Great work. That's very good.
So i have problem to get a laravel controller as a api. i try any ways for one weekend and so dissapointed. now i have one table name 'personal' is migrated true. that's have controller named 'app/Http/controllers/Api/PersonalController' and there class is 'app/Personal' and the resource are 'app/Http/Resources/PersonalCollection'. inside 'route/api.php' controller are routed true.
that's have on command 'php artisan route:list' true. so inside 'resources/js/api/tabel.js' i add the below code:
export function getPersonal() { return request({ url: '/personal', method: 'get', }); }
then create a vue component for test it like this:
so after run server and 'npm run watch' inside browser console have an error say TypeError: response.data is undefined
and inside browser network personal are loaded as xhr couses and html type. that's header are passed OK but in Response are loaded laravue default page.
this page are routed on 'route/web.php' as {any}
i try other way like SPA, direct request, loaded axios inside component and etc but all wayes return this problem.
Could you please guide me how can i create pages for Front-End in spa, which will allow to see for all. like, home, about, testimonials, contacts, etc etc. Thanks.
Open https://laravue.dev/#/nested/menu1/menu1-1
you see in breadcrumbs the following:
dashboard / nested / menu1 / menu1-1
"nested" works well, but if you click "dashboard" or "menu1" nothing happens and you get an error in browser console.
Hey thank you for creating this project.
I did go through all of the steps to create the project.
I also did run dev and production.
The thing is that it does not work in firefox.
It gives me the following error: SyntaxError: invalid regexp group
in the console. The page itself is blank.
Where as when I run it in chrome-based browsers (like chromium or brave) it works.
I am using php artisan serve
to run the it in localhost.
I am running manjaro-linux.
Reference: laravel-mix/laravel-mix#1870
Hi, I'm having trouble finding the endpoint config of the articles route.
I was expecting it to be in the routes/api file.
I can not get any Elelemt UI icons working in the side navigation
meta: { title: 'Import', icon: 'el-icon-upload', noCache: true },
This doesn't who the upload icon. if I use the standard icons this works fine is there documentation to how I declare these el-icons inside a meta grouping?
On first install (after key gen and config:cache):
php artisan:serve
Attempting to login via default credentials results in a 405 error.
message: "The POST method is not supported for this route. Supported methods: GET, HEAD."
Route: /auth/login
Is there a plan to be compatible with "swooletw/laravel-swoole" due to some performance reasons of laravel?
Hi it's me again... So ive have no installed it on my Homestead but cannot login, am I forgetting something?
api/auth/login 500 (Internal Server Error) (in console)
Request failed with status code 500
I cant seem to get project to work,
After I install all(node-sass always fails), and I try npm run dev, it throws a complain that It cant find node-sass.
ive tried "sudo npm install --save-dev --unsafe-perm node-sass"
I use a linux. ive granted all permissions on the node_modules folder recursively. seeing this project im so eager t test it but wont work for me.
Sorry for the noob question by the way
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.