Giter Site home page Giter Site logo

logikoss_test's Introduction

#Prueba Técnica Logikoss

  • Clonar este proyecto

  • Genera los archivo de auth

  • Genera una migracion donde añadas 2 nuevos campos username string unique y avatar string nullable

  • Crea un CRUD de Usuarios implementado el almacenamiento de imagenes para el campo avatar

    • Opcional Paginación, Ajax y Busqueda puntos extra

Cap

Referencia del CRUD

  • Añade otro modelo Role y su migración con la siguiente estructura
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('roles', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name');
            $table->timestamps();
        });
        
        Schema::create('user_role', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id');
            $table->unsignedBigInteger('role_id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('roles');
        
        Schema::dropIfExists('user_role');
    }
}
  • Crea la relacion 1 usuario puede tener 1 o más roles

    • Opcional crear un trait para tener métodos adicionales en el modelo User y facilitar el uso de la lógica de roles
  • Crear un modelo de Post con su migracion

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePostsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title');
            $table->longText('content')->nullable();
            $table->string('image')->nullable();
            $table->string('slug');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('posts');
    }
}
  • Generar un CRUD para posts donde apliques una Policy y un Request, en el controlador implementar la inyeccion de dependencia del modelo y utilizar el campo slug como parámetro de busqueda

    • Opcional Implementar carga de imagen en el campo image y wysiwyg-editor para el campo content
  • Implementar Pruebas Unitarias para ambos casos y subir tus cambios.

  • Puntos extra utilizar componentes de Vue y framework Css diferente a Bootstrap

  • Subir todos los cambios en tu fork y compartir el repo.

Se probará en un ambiente con PHP7.2, MySql5.7 bd laravel , user root pass secret y se ejecutarán los siguientes comandos

git clone project
cp .env.example .env
composer install
php artisan key:generate
php artisan storage:link
php artisan migrate
npm install
npm run dev
  • Al finalizar subir el proyecto a un repositorio publico en tu cuenta de github.

logikoss_test's People

Contributors

happones avatar icossi avatar

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.