Coder Social home page Coder Social logo

amranidev / scaffold-interface Goto Github PK

View Code? Open in Web Editor NEW
908.0 58.0 139.0 808 KB

:rocket: A Smart CRUD Generator For Laravel

Home Page: https://amranidev.github.io/scaffold-interface/docs/

License: MIT License

PHP 51.28% JavaScript 3.21% CSS 0.27% Blade 45.24%
laravel crud scaffold php scaffold-interface

scaffold-interface's Introduction

Imgur Gitter chat Build Status StyleCI Built For Laravel Total Downloads Latest Stable Version Latest Unstable Version License

Scaffold

Features

  • Generate your models, views, controllers, routes and migrations just in a few clicks.

  • Models visualization through a graph presentation (New Feature).

  • Views scaffolding support Bootstrap and Materialize css.

  • Generate (OneToMany,ManyToMany) relationships including views and controllers.

  • Websockets using pusher notifications.

  • AdminLTE dashboard template with users management system (users-roles-permissions) using laravel-permission.

  • Softdeletes and timestamps.

  • A delete confirmation message.

  • Using an interface to design your table.

  • Rollback possibility.

  • Generate CRUD for packages, see Lpackager, CRUD for packages/modules.

Installation

  1. Run the following command:

composer require amranidev/scaffold-interface

  1. Add the service providers to config/app.php:
Amranidev\ScaffoldInterface\ScaffoldInterfaceServiceProvider::class,
Amranidev\Ajaxis\AjaxisServiceProvider::class,
Spatie\Permission\PermissionServiceProvider::class,
Pusher\Laravel\PusherServiceProvider::class,
  1. Publish the assets in your application with:

php artisan vendor:publish

  1. Run migrations:

php artisan migrate

  1. Authentication scaffolding:

php artisan make:auth

  1. Add HasRole dependency to app/User.php:
<?php

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use Notifiable;
    use HasRoles;
}

Congratulations, you have successfully installed Scaffold Interface!

Detailed Documentation

Full documentation.

Contribution

Any ideas are welcome. Feel free to submit any issues or pull requests.

Author

Credits

scaffold-interface's People

Contributors

acharkizakaria avatar amranidev avatar davejal avatar elharrakmoncef1 avatar gregoryduckworth avatar gsvaldevieso avatar jeroen-g avatar oscarnascimento avatar osthafen avatar saviofreitas avatar shoully avatar snickbit avatar tmdh avatar zoxta 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  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

scaffold-interface's Issues

ManyToMany.php bug

Hello

You have a little bug in your ManyToMany.php class. You forget to include "<?php\n\n" in your view template, and the migration file that is created does not include <?php so it can't be migrated to database unless you manually add it. I modified your ManyToMany.php :
$migrationContent = "<?php\n\n".view('scaffold-interface::template.ManyToMany.migration', $this->tables)->render();

Maybe update your repo for future users :)

[New Feature] Graphical representation

A cool new feature coming soon!!

This feature be able to deduce a graphical representation for Models those being generated through this package, so you could visualize your app entities and their relationships.

Installation on Cloud 9 (c9.io)

Hi,

I'm having current errors while trying to include scaffold-interface to a laravel v5.4 c9 workspace.

Can You help me?

Thanks!

This is from site.site/scaffold:
image

This error happens when trying to register:
image

Javascript links are static

In index.blade.php the url for javascript links should be

<script type="text/javascript" src = "{{ URL::asset('js/AjaxisMaterialize.js')}}"></script>
<script type="text/javascript" src = "{{ URL::asset('js/scaffold-interface-js/customA.js')}}"></script>

Little Bug - only comparing first char

Hi Amrani,
thanks for your project - I love it!

I think I found a little bug: Because of the [0] this function compares only the first char of each string - so two table names with equal first letters would return true.

private function check(array $request) { return $request['table1'][0] == $request['table2'][0] ? true : false; }

it should be:

private function check(array $request) { return $request['table1'] == $request['table2'] ? true : false; }

https://github.com/amranidev/scaffold-interface/blob/master/src/Http/Controllers/GuiController.php#L275

Laravel 5.3 compliance - route files

As of now your package puts the generated routes into the /App/Http/routes.php (creates a new file if there is none)

In Laravel 5.3 routes are placed in /routes folder.
There are two files out of the box there: web and api. I myself have another one defined.

The optimal way would be any of the pre-defined files or custom file to be named by user

[Project] scaffold landing page

We are going to add a default landing page to be published under "resources/views/scaffold-interface"

Using

  • Bootstrap.

Contains

  • Navigation bar.
  • login/register section.
  • Responsive UX layouts.
  • Footer.
  • Additional information (About - Contact us)

Let's do something creative !!

Error inserting into database

Hi,

I've installed Josh Admin Template in a fresh version of Laravel 5.3, after this, I've installed scaffold-interface.

Almost all pages works fine: index, edit, delete, show and create.

But when I try to insert a register, i receive this message:

The mypage.com page isn’t working
mypage.com is currently unable to handle this request.

I've tried to change this line:

<form method = 'POST' action = '{{url("jogador")}}'>

to

<form method = 'POST' action = '/jogador/store'>

and create this route:

Route::resource('jogador/store','\App\Http\Controllers\JogadorController@store');

But still not worked.

Can u help me?

[Insight] Text files should end with a newline character - in resources/…/ManyToMany/model.blade.php, line 31

in resources/views/template/ManyToMany/model.blade.php, line 31

This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

     */
    public function remove{{ucfirst(str_singular($model))}}(${{str_singular($model)}})
    {
        return $this->{{str_plural($model)}}()->detach(${{str_singular($model)}});
    }
    

Posted from SensioLabsInsight

Problem to generate table

Hey man, how are you?

Problem to generate table with relationship, My tables don't appear in combobox, my tables are all migrated, can you help me?

Thanks!

Here are some image:

erro scaffold

captura de tela de 2016-12-18 23-05-08

Feature request: timestamps + softdeletes + some other columns

Hi,
your package is great! I just started using it

I suggest this:
in each table I add these columns:

    $table->integer('creator_id')->unsigned()->nullable();
    $table->integer('updater_id')->unsigned()->nullable();
    $table->timestamps();
    $table->softDeletes();

Can you add an option to add them when treating migration?

Thx!

form action uses hardcoded url

Love what you done so far.

I am testing your package and noticed when you generate the form method in the view you use a hardcoded url. This will be a problem as the development is on a local machine and then will be used on a server that is not running on part 8000

Error with Views

Hi,

I install your package and I got some problems with views.

I see vars like : {{errorMsg}} , {{final.table}}, {{final.onData}}, {{element}} ...

And actions buttons (new, remove, more, back...) are not working

Maybe I need to install some pacakges to make it work?

Thanks.

New Release coming soon

A bunch of repairs coming soon with new release v1.6.*

  • Views layouts will be exported to your app under(resources/views/scaffold-interface/layouts/), so you could edit your layouts before making CRUD.

  • Delete message error will be definitely fixed.

All these things are available in dev-master, fell free to use dev-maser as well until the new version is released.

How Edit Table

Helllo

@amranidev

How can Edit Table after created
i need add new rows or one to many after miss feature

Thanks

Best Regard

FJMPCHATO

sqlite problem in creating relationship fields

sorry for the earlier post about this topic, i ididn't check the ajax request, it get http status 500, it 's turn out that sqlite doesn't recognize "show columns from tbl_name;" command, the getResult() method in autoarray class, cannot use getAttributes().
so i use Schema::getColumnListing($table) instead to get list of column

[Proposal] Pagination system

First, congratulates for your project
Like suggestion, you can do a search and pagination system. they're welcome.

[Proposal] Admin-LTE integration

I think scaffold-interface is awesome, but it miss some important features.
I gave it a trying, and I easy to generate all file for my module with full layout and ready to use.
I use result as init front-end template in my app, and I must take more time to clone it to current AdmindLTE to manage generated module that I just created.
and finally, I hope add a option to generate admin management for the generated table same with current (Permissions, Roles, Users) and current file will use as front-end

Capital Letters

I have already existing tables that i am trying to scaffold . Some column names have camel casing. When generating the views the capitals are converted into small letters .

[Proposal] Exposing API

Hey,
I was thinking if API of this package is exposed, so then we can hook into custom created tables. This will help more in customization and lot of things can be achieved.

Unable to execute migration step on new install

Followed step 1-3 without problems

On step 4 I get the following error:


> [Illuminate\Database\QueryException]
> SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
> oo long; max key length is 767 bytes (SQL: alter table `users` add unique `
> users_email_unique`(`email`))
> 
> 
> 
> [PDOException]
> SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
> oo long; max key length is 767 bytes

I have installed this scaffold-interface many times without problems and this time I'm installing it again, but it's given this problem so many time now.

New release

scaffold-interface v1.6.21 is now released.

Routes moved

In version 5.3.28 the routes are in a different location (i.e., routes/web.php not /Http/routes.php) and I believe this is keeping the routes file from getting updated.

Lists method does not exist

In GuiController at line 33:

$scaffoldList = Scaffoldinterface::all()->lists('tablename');

The lists method does not exist.

Naming Conventions

Guys, this is product of the future! Please keep improving. I even would pay for it :)

But this time, I want to ask about tables naming convention. I have create tale category_descriptions, so expected controller should be CategoryDescriptionsController.php and model CategoryDescription.php, but I have got Category_descriptionController.php, so everything went not so well -routes, views and so on. I think naming convention should be first words always in singular expression and the last one in plural, as in Ruby on Rails. And Maybe camel-case?

Thanks thanks thanks :)

Class web does not exist

Hello,

I am trying to install v1.4.11 for laravel 5.1.x in the sximo5 framework.

The error is:

ReflectionException in Container.php line 741: Class web does not exist

Could anyone help me?

Can't composer update when add scaffold package

When i add scaffold to composer.json and run
composer update
i got this error

 - amranidev/scaffold-interface v1.5.0 requires spatie/laravel-permission ^1.5 -> satisfiable by spatie/laravel-permission[1.5.0, 1.5.1].
    - amranidev/scaffold-interface v1.5.15 requires spatie/laravel-permission ^1.5 -> satisfiable by spatie/laravel-permission[1.5.0, 1.5.1].
    - spatie/laravel-permission 1.5.1 requires php >=5.6.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - spatie/laravel-permission 1.5.0 requires php >=5.6.0 -> your PHP version (5.5.36) does not satisfy that requirement.
    - Installation request for amranidev/scaffold-interface v1.5.* -> satisfiable by amranidev/scaffold-interface[v1.5.0, v1.5.15].

Please help me fix

[Question] What do you think about this feature (user-role-middleware)??

Hi everyone and thank you for using scaffold-interface.

I would like to open this discussion to add new features you may be friendly with.

This feature reach to create entity includes user-role permission, and generate routes handle Role-middleware.

Also this feature could scaffold user-role system automatically, user-role (MayToMany).

Ideas are warmly welcomed!

Problem to edit records with relationship

Hello! First, it's a good job!
I have a problem when I am editing records with fields have relationship , the Views edit don't show me actual records fields, it shows the first option on a select field and not a actual records in the fields recorded in database.

Could you help me to fix it?
Thanks!

primary key

cant u make it without increments ? so we can make our primary key

Master-Detail pages

When creating onetomany it would be great if the pages for master-detail (parent-child) would also be created.

one to many

Hi!
Thanks for the CRUD generator. I can't get one2many to work
I create table citys and have a column nammed cityName.

Then when I create table members I click "One to many" I chose table citys and column cityName.
Then I generate table members and its scripts.
I expect a dropdown to show up when I want to add a member, but it doesnt.

Getting error in Dashboard on a fresh installation

After having add 2 roles to roles I switch to user in order to add roles to a user I get this error:

ErrorException in 70a34edc433640635e97bdad90b795b7c04bb18a.php line 56:
Invalid argument supplied for foreach() (View: C:\laravel\z\resources\views\scaffold-interface\users\edit.blade.php)

cannot creat one to many relationship with custom tables created

laravelcrudissue

Have adde scaffold library to my project.
Creating simple table dont have any issue, but when i tried to map one to many relationshiop its giving me error.

I can select table and column except the id but when i click ready button its removing the added column from form.

a little help with search!

Hi Guy!
I've implemented a Scout search engine in my app, using your tips, It's working partially.
I have problem with tables relationship , the search don't find records for text. In other word in table without relationships the search works well.
Could you help me, can you see what's wrong?

This is my Model funcionarios.php:

`<?php

namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laravel\Scout\Searchable;
/**

public $fillable = ['funcionarios'];
/**
* Get the index name for the model.
*
* @return string

*/
    public function searchableAs()

{
    return 'funcionarios.index';
}
public function siem()
{
	return $this->belongsTo('App\Siem','siem_id');
}

   public function ocupacao()
{
	return $this->belongsTo('App\Ocupacao','ocupacao_id');
}

public function pessoa()
{
	return $this->belongsTo('App\Pessoa','pessoa_id');
}

}
`

and this is my FuncionariosController, just my function index:

public function index(Request $request)

{

	if($request->has('funcionariosearch')){

		$funcionarios = Funcionario::search($request->funcionariosearch)

			->paginate(6);

	}else{

		$funcionarios = Funcionario::paginate(6);

	}

	return view('funcionario.index',compact('funcionarios'));

}

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.