Giter Club home page Giter Club logo

films's Introduction

Hi there ๐Ÿ‘‹, I'm Abdullah Shublaq

I am a intermediate web developer with +3 years of experience in PHP Laravel, with multi-language multi-regional projects.
I'm a fast learner, love doing challenges and problem solving.

PRIMARY SKILLS

  • PHP Laravel.
  • TDD.
  • HTML, CSS, SASS, JS.
  • Bootstrap, TailwindCSS.
  • JQuery, Ajax, Vuejs.
  • RESTFul API.
  • MySQL, Oracle, MongoDB, PostgreSQL, Firebase.
  • Git, Github, BitBucket.

Linkedin: abdullahshublaq

GitHub AbdulahShublaq

Visitors

films's People

Contributors

abdullahshublaq avatar raynirola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

films's Issues

Code review.

  • Installation:

When installing the app I faced some problem and found some missing steps.

-Composer update will install/update all dependency.

  • Missing : copy .env.example .env

  • Double install of laravel/passport. It's already inside your composer JSON. Don't need separate installation.

  • php artisan migrate does not have --seed included

-After seed super admin is not created in the database.

  • UI

  • Use movie slug to show movies, now showing numbers

  • Pretty url for seo > Actors URL can be improved

  • Why contact us on every page? Create separate contact us page

  • Change login Form Fields FIRST_NAME?

  • Route
    -Why Duplicate
    Route::get('/user/reviews', 'ClientController@reviews');

  • Controller
    -Refactor code Dashboard\mostly to all validate

    $attributes = $request->validate([
    'name' => 'required|string|max:30|min:3|unique:actors',
    'dob' => 'required|date',
    'overview' => 'required|string',
    'biography' => 'required|string',
    'avatar' => 'required|image',
    'background_cover' => 'required|image',
    ]);

convert to request class/service
or create a function like

private function validate()
{
    return request()->validate([
        'name' => 'required|string|max:30|min:3|unique:actors',
        'dob' => 'required|date',
        'overview' => 'required|string',
        'biography' => 'required|string',
        'avatar' => 'required|image',
        'background_cover' => 'required|image',
    ]);
}

and use, this will return an array which is validated. All extra request field will be exempt. ex: $attribute don't have $request->password values. you have to add it later.
$attributes = $this->validate();

Code review

Sorry for nitpicking in some places. In my opinion code should always stay consistent, use PSR standards.
Please consider phpCS ( code sniffer ) and phpMD ( mess detector ). These 2 tools will improve your code quality and cleanliness in general.

Good luck,

Karolis from OneSoft

deleted instead of deleting

static::deleting(function (Actor $actor) {

I suppose u need to use deleted instead of deleting .
the reason is you cant be sure the Actor model will be deleted, maybe some kind of an error would stop Actor be deleted .

Simple Clean of LoginController.php

public function login(Request $request)

I feel you can do better in login method:

1- It will be better to move the validation to request form, and be more specific in your rules as follow:

$validation = $request->validate([
    'email' => 'required|string|email',
    'password' => 'required|string|min:8|max:20' // feel free to change the numbers ..
]);

2- It will more readable to change this part:

$login = [
    'email' => $request->email,
    'password' => $request->password
];

To:

$credentials = $request->only(['email','password']);

3- Last thing, I saw your API files, you duplicated the return response a lot, and that would be problem when in the future you decide to change the form of that response and add another things to it, would be nice to put it in one place:

  • Go to Controller.php (the core of all controllers) and create new protected method like this:
protected function responseJson($status, $message, $token = null)
{
    return response([
        'status' => $status,
        'message' => $message,
        'token' => $token
    ]);
}

Then In any controller just call the responseJson one as follow:

return $this->responseJson('success', 'auth success',$token);

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.