GithubHelp home page GithubHelp logo

brackets-by-triad / craftable Goto Github PK

View Code? Open in Web Editor NEW
965.0 27.0 190.0 177 KB

Admin panel builder / CRUD generator for Laravel.

Home Page: https://getcraftable.com

License: MIT License

PHP 100.00%
cms laravel php craftable crud

craftable's Introduction

🔥 BIG NEWS 🔥

We have just released Craftable PRO - the premium version of this popular open-source laravel admin panel builder. Pro version comes with fresh UI built on top of Tailwind, it uses latest Laravel and InertiaJS and ships with lot of new features.


Craftable - build admin panels with Laravel

About

Hi Crafter, welcome to the official documentation for Craftable 6 - a Laravel-based open-source toolkit for building administration interfaces. It's an administration area minimalistic template. A starting point for developing back-office systems, intranets or a CMS systems.

Craftable administration area example

You could call it CMS, but it's a very slim one, with as little content to manage as possible. It has:

  • UI - nice admin template based on CoreUI (http://coreui.io/)
  • CRUD generator
  • Authorization, My profile & Users CRUD
  • Translations manager
  • other helpers to quickly bootstrap your new administration area (Media Library, Admin Listing, etc.)

Demo

We have created a demo for you to play around at https://demo.getcraftable.com.

Use these credentials to sign-in:

You can see an administration of:

  • Posts - this is the standard CRUD generated with admin-generator package
  • Translatable Articles - this is the showcase for translatableeloquent models
  • Manage access - is a extended CRUD for the User (your existing eloquent model) management
  • Translations - where you can manage the translations stored in the database

Made of components

Our intent was to split all the stuff into several packages with as least dependencies as possible. This is what we're coming with at the moment:

Craftable uses all the packages above. It also uses some other 3rd party packages (like Spatie's spatie/laravel-permission) and provides some basic default configuration to speed up a development of a typical administration interface.

Requirements

Craftable requires:

  • PHP 7.4+
  • Supported databases:
    • MySQL 5.7+
    • PostgreSQL 9.5+
  • npm 5.3+
  • node 8.4+

Craftable uses Laravel so you should check out its requirements too. It is compatible with Laravel 8:

Installation

New Craftable project

If you want to start on fresh Laravel, you can use our brackets/craftable-installer that do all the tricks for you. Let's install it globally:

composer global require "brackets/craftable-installer"

Create an empty database of your choice (PostgreSQL or MySQL).

Now you can create a new Craftable project:

craftable new my_project

This will install Craftable using latest Laravel version (currently 6). If you prefer tu use latest LTS Laravel version (currently also 6), use --lts flag:

craftable new --lts my_project

The commands is going to ask for a database settings and then it will setup everything (install all dependencies, publish all important vendor configs, migrate, setup some configs, webpack config and run migrations).

Command is going to generate and print the password for the default administrator account. Save this password to your clipboard, we are going to need it soon.

Add Craftable to existing project

Or alternatively, you can use your existing Laravel application. Start with requiring these two main packages:

composer require brackets/craftable
composer require --dev brackets/admin-generator

To install this package use:

php artisan craftable:install

This is going to install all dependencies, publish all important vendor configs, migrate, setup some configs, webpack config and run migrations.

Command is going to generate and print the password for the default administrator account. Save this password to your clipboard, we are going to need it soon.

Basics

Once installed, navigate your browser to /admin/login. You should be able to see a login screen.

Admin login form

Use these credentials to log in:

  • E-mail: [email protected]
  • Password: use password from you clipboard (it was printed in the end of the craftable:install command)

After authorization you should be able to see a default homepage and two menu items:

  • Manage access
  • Translations

Admin homepage

Documentation

You can find full documentation of this package and other our packages Craftable uses at https://docs.getcraftable.com/#/craftable.

Where to go next?

At this point you are ready to start building your administration area. You probably want to start building a typical CRUD interface for your eloquent models. You should definitely check our Admin Generator documentation.

In case you rather want to create some atypical custom made administration, then you probably want to head over to Admin UI package.

Have fun & craft something awesome!

How to contribute:

  • Drop a ⭐ on the Github repository (optional)

  • Before Contribute Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md.

  • Create an issue of the project or a feature you would like to add in the project and get the task assigned for youself.(Issue can be any bug fixes or any feature you want to add in this project).

  • Fork the repo to your Github.

  • Clone the Repo by going to your local Git Client in a particular local folder in your local machine by using this command with your forked repository link in place of below given link:
    git clone https://github.com/BRACKETS-by-TRIAD/craftable

  • Create a branch using below command. git branch <your branch name>

  • Checkout to your branch. git checkout <your branch name>

  • Add your code in your local machine folder. git add .

  • Commit your changes. git commit -m"<add your message here>"

  • Push your changes. git push --set-upstream origin <your branch name>

  • Make a pull request! (compare your branch with the owner main branch)

Contributors🌟


Kudos to these amazing people


Licence

MIT Licence. Refer to the LICENSE file to get more info.

craftable's People

Contributors

dejwcake avatar epixian avatar erikgreasy avatar matejminar avatar palypster avatar richarddominik avatar sb-decoder avatar sdudasko avatar strstensky avatar subalee avatar timoransky avatar waynebrummer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craftable's Issues

How to update CRUD generation ?

Hello,

Let's say we generate a post crud as:
php artisan admin:generate posts

How is it possible to update changes in the CRUD done from a migration update?
It looks like you have to delete many files manually(both php and js) and rerun the command again.

I could not find any help on your website regarding this.

Thank you.

Error after install

Hi... I get this error after artisan install

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server ver
sion for the right syntax to use near 'WHERE deleted_at IS NULL' at line 1 (
SQL: CREATE UNIQUE INDEX users_email_null_deleted_at ON users (email) WHERE
deleted_at IS NULL;)

[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server ver
sion for the right syntax to use near 'WHERE deleted_at IS NULL' at line 1

[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server ver
sion for the right syntax to use near 'WHERE deleted_at IS NULL' at line 1

how to create roles and permission?

Not actually issue, just need help to create role and permission.

Is there way to seek for help or forum where I can post questions regarding craftable?

Can't install

After running the below command I get an error

The Command

composer global require "brackets/craftable-installer"

The Error

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - brackets/craftable-installer v1.0.6 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.5 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.4 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.3 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.2 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.1 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - brackets/craftable-installer v1.0.0 requires laravel/installer ~1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1, v1.5.0] but these conflict with your requirements or minimum-stability.
    - Installation request for brackets/craftable-installer ^1.0 -> satisfiable by brackets/craftable-installer[v1.0.0, v1.0.1, v1.0.2, v1.0.3, v1.0.4, v1.0.5, v1.0.6].

Migration error issue

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version fo
r the right syntax to use near 'json not null, custom_properties json not null, order_column int unsigned nu' at line 1 (SQL: create table media (id int
unsigned not null auto_increment primary key, model_id int unsigned not null, model_type varchar(255) not null, collection_name varchar(255) not null, nam e varchar(255) not null, file_name varchar(255) not null, mime_type varchar(255) null, disk varchar(255) not null, size int unsigned not null, manipula tions json not null, custom_properties json not null, order_column int unsigned null, created_at timestamp null, updated_at timestamp null) default char
acter set utf8mb4 collate utf8mb4_unicode_ci)

image

Routes not working when installation is in sub folder

Hello,

I have installed correctly Craftable (Installer 1.0.9) in a sub folder as:
https://mywebsite.com/management/

The commands(I am on windows 10) were:
Create database and save details

composer global require "brackets/craftable-installer"
craftable new --no-install project_name
php artisan craftable:init-env
php artisan craftable:install
npm install
npm run dev

Datatabase and .ENV have both been set up. I added the APP_URL as:
https://mywebsite.com/management/

Now when I try to go to:
https://mywebsite.com/management/admin/login

I get the page error:

Not Found
The requested URL /management/admin/login was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any idea what I have to do to get it to work?

Thank you,

Multiple Users

i recently graft the craftable, so awesome and smooth,
but i stuck on how to manage multiple users ( Dash for admin, other for User/Student ..)
Also how to deal with relationships
Thanks :)

installed but not working

i installed the craftable on laravel 5.5.28
but when i go to admin/login
it shows laravel mix error

=============================
The Mix manifest does not exist. (View: /var/www/laravel/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php) (View: /var/www/laravel/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php) (View: /var/www/laravel/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php)

can anyone help ?
Thank you.

Dropdown items in sidebar

How can I add a dropdown item (with subitems) in the sidebar? I've tried to add markup and styles as described in coreui theme website but it doesn't work.

first login issue on fresh installation

I freshly installed craftable and head to /admin page. Then it showed me follwing error:

"The Mix manifest does not exist. (View: craftablecms/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php) (View: craftablecms/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php) (View: craftablecms/vendor/brackets/admin-ui/resources/views/admin/partials/main-styles.blade.php)

I am using php artisan serve for development

static navigation instead of ajax

Hi! Really good toolkit. But I don't like ajax navigation, sorting and filtering. Don't get me wrong. Let's imagine - I found some interesting thing on page 25 with filter "something wrong" and sorting via column city by descending. And now i'd like to share this information to my collegue. What should I do? write a long letter, explaining the method I've found that thing and then prey that he don't lost some step from my instruction? I my opinion giving just a link with that params would be much easier for all.

So, my question - is there some option to disable dynamic navigation\sorting\filtering, or i need to rewrite it?

Keep getting 403, even though user has correct role and permission

I've added a new Role and corresponding permissions to my app. I've created a new user, gave it the correct Role and logged in.

I'm getting an instant 403 on the dashboard page, which leads back to the AdminMiddleware. For some reason I can't turn this middleware off, my routes are protected no matter what. Even without the explicit group() statement. Also, there is no middleware declaration for the Admin class in my kernel?

Route::get('/', function () {
    return redirect('/admin');  // Throws a 403
});

Any thoughts or help on what is going on?

EDIT
Updated my AuthServiceProvider with the admin ability as explained here. This let me access the dashboard/homepage, but every other page still throws a 403. This is caused by the $this->authorize(...) lines in the controllers though.

Fonts not loaded

I'm having issues where the fonts are not loaded, I'm getting 404 errors on font-awesome and Simple-Line-Icons.

For example: It tries to load /build/admin/fonts/fontawesome-webfont.ttf?v=4.6.3, but there is no /build/admin/fonts directory in my /public directory at all. I can see the fonts are located in /public/fonts/vendor/craftable/coreui/ though.

I already ran npm install and npm run dev.

Keep having SQLSTATE[42S02]: Base table or view not found: 1146 Table *.translation doesn't exist

Hi there, I just keep having this ERROR message when trying to access localhost/admin/login

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kienhoanh_cp.translations' doesn't exist (SQL: select * from translations where namespace = brackets/admin-auth and group = admin and translations.deleted_at is null) (View: D:\For GIT\kienhoanh-cp\vendor\brackets\admin-auth\resources\views\admin\auth\login.blade.php)

Then I tend to create Translation table, but I don't know how many column is it!?.

Please help me.

Here some images about my case
image

there is no table called translation on migration folder
image

How to add admin user from cli?

Command craftable:install doesn't success complete, after deployment to production server, but admin user has been created, however generated password doesn't show in console, because craftable:install failed complete.

generator

is it generate from database tables ?

anything ?

How to make model translatable (form view)

Hi, how to make model translatable?
i made, migration with i.e. name field as text, migrated it, and artisan admin:generate post.
After that i npm run dev and added and (use) HasTranslations trait on model, and set this "name" field to be in $translatable array.
Still no translation variants in create form view.

(i guess same thing is with mediable - uploading images to model)

br and sorry if i am missing something obvious.

Cannot install in existing Laravel 5.6 app

I'm getting the following. The issue seems to be that the brackets/media package is requiring Laravel 5.5 components - might be as simple as tagging a new media release, since the composer.json seems to allow 5.6?

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install brackets/craftable v2.0.0
    - Conclusion: remove laravel/framework v5.6.27
    - Conclusion: don't install laravel/framework v5.6.27
    - Conclusion: don't install brackets/craftable v2.0.0|don't install spatie/laravel-medialibrary v6.x-dev|install brackets/media v1.0.0|install brackets/media v1.0.0-beta|install brackets/media v1.0
.1
    - brackets/media v1.0.0 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[5.5.x-dev], illuminate/support[5.5.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34,
v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41].
    - brackets/media v1.0.0-beta requires illuminate/support 5.5.* -> satisfiable by laravel/framework[5.5.x-dev], illuminate/support[5.5.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5
.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41].
    - brackets/media v1.0.1 requires illuminate/support 5.5.* -> satisfiable by laravel/framework[5.5.x-dev], illuminate/support[5.5.x-dev, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34,
v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41].
    - Can only install one of: laravel/framework[5.5.x-dev, v5.6.27].
    - illuminate/support 5.5.x-dev conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.0 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.16 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.17 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.2 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.28 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.35 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.36 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.37 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.39 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.40 conflicts with laravel/framework[v5.6.27].
    - illuminate/support v5.5.41 conflicts with laravel/framework[v5.6.27].
    - don't install illuminate/support v5.5.33|don't install laravel/framework v5.6.27
    - don't install illuminate/support v5.5.34|don't install laravel/framework v5.6.27
    - Installation request for laravel/framework (locked at v5.6.27, required as 5.6.*) -> satisfiable by laravel/framework[v5.6.27].
    - Conclusion: don't install brackets/craftable v2.0.0|don't install spatie/laravel-medialibrary v6.x-dev|install brackets/media v1.0.0|install brackets/media v1.0.0-beta|install brackets/media v1.0
.1
    - Installation request for brackets/craftable ^2.0 -> satisfiable by brackets/craftable[2.0.x-dev, v2.0.0].
    - brackets/craftable 2.0.x-dev requires brackets/media ^1.0 -> satisfiable by brackets/media[1.0.x-dev, v1.0.0, v1.0.0-beta, v1.0.1, v1.0.2].
    - brackets/media 1.0.x-dev requires spatie/laravel-medialibrary ^6.0 -> satisfiable by spatie/laravel-medialibrary[v6.x-dev].
    - brackets/media v1.0.2 requires spatie/laravel-medialibrary ^6.0 -> satisfiable by spatie/laravel-medialibrary[v6.x-dev].
    - Conclusion: don't install spatie/laravel-medialibrary v6.x-dev|install brackets/media v1.0.0|install brackets/media v1.0.0-beta|install brackets/media v1.0.1


Installation failed, reverting ./composer.json to its original content.

Installation aborted after DB Question on Win10

Hi there, just want to try out craftable (with "craftable new" command) but my installation always abort at the end after the DB system question "What database driver do you use?" ==> "Aborted".
System:Win 10 with php 7.1, MySQL 5.7.14
image

TinyMCE editor

Hello!

Is it possible to use tinyMCE instead of current wysiwyg editor?

How to add language for admin?

I don't understand what to do. In docs I didn't find this. I want add language and then deploy this to the server.

Thanks.

Media uploader with PDF

Hi and thanks in advance, I created a model with a collection to store pdf files

        $this->addMediaCollection('public_attachments')
            ->accepts('pdf/*');

In the uploader I can see that the acceptedFiletypes variable in vue is "pdf/*"
But when I select the pdf file the uploader warns me "you can't upload files of this type"

Thanks.

Multiselect with object

Hi!
First, i need to congratulate you for the awesome project.

I'm having trouble to use the multiselect to make relationships. I need use it with KEY => VALUE, but it's not working, even consulting the multiselect documentation. Can you help me?

Empty Translations tab

Hello there,

My translations are not showing anymore in the Translations tab. I'm not sure how to debug this, as there is not error in the console and in my logs.

I ran php artisan admin-translations:scan-and-save which returned 343 translations saved. Also, all translations are correctly showing in my translations table.

Did you ever encounter this issue?

Let me know should you need any additional information.

Thanks for your help,
Nicolas

screenshot 2018-07-05 13 00 52

Errors in media library

Hi, first I want to say thanks because this package is awesome.
I'm testing the Media library in a fresh installation.

My model looks like this (model created with admin generator).

`<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;

use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions;
use Spatie\MediaLibrary\Media;

use Brackets\Media\HasMedia\HasMediaCollections;
use Brackets\Media\HasMedia\HasMediaCollectionsTrait;

class Album extends Model implements HasMediaCollections, HasMediaConversions
{

use HasMediaCollectionsTrait;



public function registerMediaCollections()
{
    $this->addMediaCollection('gallery');
}

public function registerMediaConversions(Media $media = null)
{
    $this->addMediaConversion('detail_hd')
        ->width(1920)
        ->height(1080)
        ->performOnCollections('gallery');
}`

Using the media uploader, the media seems to upload correctly. But if I try to retrieve the media
$media = Album::first()->getMedia('gallery'); dd($media[0]);

I get this error:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function filter() on string
Symfony
\Component
\Debug
\Exception
\FatalThrowableError

/vendor
/spatie
/laravel-medialibrary
/src
/HasMedia
/HasMediaTrait.php
455

Also in My ide I always get warnings when I'm building the model
In addMediaConversion method i get warnings about use invalid Manipulations
and in MediaCollections i get the warning already defined in registerMediaCollections() function.

error after php artisan craftable:install

craftable installs successfully but cant run any artisan commands, like config:cache, serve etc
it returns error
In ClassLoader.php line 444:

include(C:\wamp\www\craft\vendor\composer/../../app/User.php): failed to open stream: No such file or directory

Laravel Passport Boilerplate

I use the Passport Boilerplate often and I am running into an issue where things aren't quite working correctly. I think it is because Laravel 5.5 and Passport 4.0 use Bootstrap 3, and Craftable is tied to Laravel 5.5, but Craftable is using Bootstrap 4.

It appears craftable also only uses bootstrap-sass not full bootstrap. So the .modal method, etc, does not work.

Trying to copy in the new Passport 5.0 .vue components makes things visibly look better, however, not fulling functioning. Console errors about the modal, etc. (https://github.com/laravel/passport/tree/5.0/resources/assets/js/components)

If I change my package.json and include bootstrap 4.0, and then
import bootstrap from 'bootstrap';
inside of the admin/js/bootstrap.js the modal errors go away and they do open up now.

However, I can't click on text inputs and the buttons inside of the modal do not work. It's as if the component is frozen or something.

Any suggestions on how to get craftable to play nicely with the passport components featuring bootstrap 4.0?

The Mix manifest does not exist

The Mix manifest does not exist. (View: C:\wamp310\www\cft\vendor\brackets\admin-ui\resources\views\admin\partials\main-styles.blade.php) (View: C:\wamp310\www\cft\vendor\brackets\admin-ui\resources\views\admin\partials\main-styles.blade.php) (View: C:\wamp310\www\cft\vendor\brackets\admin-ui\resources\views\admin\partials\main-styles.blade.php)

C:\wamp310\www\cft\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php

    if ($manifestDirectory && ! Str::startsWith($manifestDirectory, '/')) {
        $manifestDirectory = "/{$manifestDirectory}";
    }

    if (file_exists(public_path($manifestDirectory.'/hot'))) {
        $url = file_get_contents(public_path($manifestDirectory.'/hot'));

        if (Str::startsWith($url, ['http://', 'https://'])) {
            return new HtmlString(Str::after($url, ':').$path);
        }

        return new HtmlString("//localhost:8080{$path}");
    }

    $manifestPath = public_path($manifestDirectory.'/mix-manifest.json');

    if (! isset($manifests[$manifestPath])) {
        if (! file_exists($manifestPath)) {
            throw new Exception('The Mix manifest does not exist.');
        }

        $manifests[$manifestPath] = json_decode(file_get_contents($manifestPath), true);
    }

    $manifest = $manifests[$manifestPath];

    if (! isset($manifest[$path])) {
        report(new Exception("Unable to locate Mix file: {$path}."));

        if (! app('config')->get('app.debug')) {
            return $path;
        }
    }

pgsql check missed in ModifyUsersTable@down

I'm getting this error when php artisan migrate:refresh

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'users_email_null_deleted_at'; check that column/key exists (SQL: alter table `users` drop index `users_email_null_deleted_at`)  

Negative Numbers & Rule Validation

I have a column that is called "quantity" and created in a migration via...
$table->integer('quantity');

When the rules() were generated it make the rule be "integer". If I try to change the number to -1000 it won't allow me because of a validation rule. Here is what it says:

The quantity field may only contain numeric characters.

So it doesn't like the negative sign. I thought updating the rules() for this attribute to "string" for the store and update requests would fix this issue. But it isn't.

Any suggestions on how I can get the rule to validate for a positive or negative number?

Error installing craftable

When we install craftable directly using craftable new, the installer ask for executing a command, but didn't tell which command is. If you say yes, then we get an error because we didn't configured any database yet. I think the process is not clear.

Errors after: npm run development

First, I want to thank you for this great admin app
I have npm vnode -v5.5.1
node 6.10.3 on XAMPP

After I do: npm run development It processses 45% and then I get an error like

ERROR in ./resources/assets/admin/js/profile/edit-password/Form.js
Module not found: Error: Can't resolve '../components/Form/AppForm' in 'C:\xampp\htdocs\testingcraftable\resources\assets\admin\js\profile\edit-password'
resolve '../components/Form/AppForm' in 'C:\xampp\htdocs\testingcraftable\resources\assets\admin\js\profile\edit-password'
  using description file: C:\xampp\htdocs\testingcraftable\package.json (relative path: ./resources/assets/admin/js/profile/edit-password)
    Field 'browser' doesn't contain a valid alias configuration

To enable more detailed error messagess add --display-error-details in package.json at the end of line 5

media-upload in a vue component

I use the media-upload component in a vue component as follows:
media-upload(ref="image_uploader" collection="image" url="/upload" :max-number-of-files=1 accepted-file-types="image/*")
I extended my Model by implementing HasMediaCollections and HasMediaConversions as it is explained in the documentary.
Image is saved in the storage folder, image Collection is send to the Models create method, no errors. but the Image dosnt get an entry in the media table.
Have I skipped something?

Relationship approach

What approach do you recommend about creating relationships? For example, if I use a field with id (post_id) the options of the select field show numbers, not text values. And if I change to show a text, the validation requires “integer values”. I’m being clear?

Add permissions to users or roles

So I created a CRUD and generated the permission but I am unable to access the CRUD because I don't have the permission to do so and there are no screens which allow me to do so.

What do I need to do?

Manual installation with error: Can't resolve '../app-components/Form/AppForm'

I'm doing the manual installation as guided from here (#11)

But at the last command npm run dev I encounter the error:

\build\admin\css\app.css     355 kB       1  [emitted]  [big]  \js\app

ERROR in ./resources/assets/admin/js/profile/edit-password/Form.js
Module not found: Error: Can't resolve '../app-components/Form/AppForm' in 'E:\laragon\www\satrasysdev\resources\assets\admin\js\profile\edit-password'
 @ ./resources/assets/admin/js/profile/edit-password/Form.js 1:0-53
 @ ./resources/assets/admin/js/profile/edit-password/index.js
 @ ./resources/assets/admin/js/index.js
 @ ./resources/assets/admin/js/admin.js
 @ multi ./resources/assets/admin/js/admin.js

ERROR in ./resources/assets/admin/js/profile/edit-profile/Form.js
Module not found: Error: Can't resolve '../app-components/Form/AppForm' in 'E:\laragon\www\satrasysdev\resources\assets\admin\js\profile\edit-profile'
 @ ./resources/assets/admin/js/profile/edit-profile/Form.js 1:0-53
 @ ./resources/assets/admin/js/profile/edit-profile/index.js
 @ ./resources/assets/admin/js/index.js
 @ ./resources/assets/admin/js/admin.js
 @ multi ./resources/assets/admin/js/admin.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-02-22T08_57_48_921Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-02-22T08_57_48_969Z-debug.log

Can help me pin point what are the issues?

Media upload

Hi there, I have some trouble using media upload. I used the basic code from documentation and I have some issues.

I have created one more role (User) setting the permissions for this role into Database ( same as for the Administrator ), added the gate for User, actually everything works just fine inside my app but not the media upload.
when I am logged in as Administrator (Administrator role) it uploads the media into laravel "uploads" folder but I get nothing submitted into "media" mysql table and I guess that is the reason that I get no previous uploaded images into edit view (even that those are uploaded).

when I am logged in as a regular user (User role) I get "this action is unauthorised" (and the User roles already has admin.upload permission into database). To make it work I had to comment the $this->authorize( 'admin.upload' ); in FileUploadController.php but still I get no media library data into my database and no conversions folders (like thumbs etc.) even if I have already registered my conversions.

I read and read throughout the code, tried to understand spatie/medialibrary but with no results. I am new to Laravel and Vue (basic knowledge) and your craftable package helped me to understand allot of Laravel so that's why I won't give up until I get it to work.

Thanks :)

User class does not exist

hi guys,

I tried to install your package. No errors, it went smoothly.

Anyhow, here is what I get when I run it after installation:

 [ErrorException]
  class_implements(): Class App\Models\User does not exist and could not be loaded

Though I have App/Models/User.php

Please advise. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.