Jump to content

Danny620

Members
  • Posts

    390
  • Joined

  • Last visited

About Danny620

  • Birthday 10/12/1992

Contact Methods

  • MSN
    daniel620@hotmail.co.uk

Profile Information

  • Gender
    Male
  • Location
    UK

Danny620's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. I was thinking that but each diffrent type of users has diffrent infomation.
  2. Hi I’m trying to develop an online application that will allow ‘Candidates’ to book on courses that “Providers” have posted. The application is going to have 4 different types of users, please see attached ‘Figure 1.4 - JobSkilla User Permissions & Roles.jpg’ all of which have different information associated with them. On first signup of a provider they will complete a company profile and a user will be created as the owner associated with that “Provider” that user will then be able to invite their team members (Team associations) to share the same “Provider” data but with restricted access to areas such as billing / invoives. I’m going to be building the application using laravel 5.2, I still want to use laravels Auth but how can I allow multiple auths? I was thinking of having a table called “Auth” that could manage the logins with a forging key to the ‘candidates’, ‘providers’ table. What’s the best way of handling multiple logins that are associated with 1 “Provider”? I’ve attached a EER diagram with the current database design this may be incomplete. I wanted to ask for some guidance with the best way to program/db design the project. I would appreciate if anyone can give me a better solution or point me in the right direction. I don't mind paying for advice. JobSkilla EER Diagram.pdf
  3. Ive been thinking of creating one table to hold the login details like Auth id, email, password, user_id, provider_id, advisor_id Then link to auth to like users table where it can hold there details such as first_name, last_name What do you think? Has anyone seen this implemented before?
  4. Hi all, I’m building a search engine to find courses online; I wanted to ask for some guidance with the best way to program/structure the project. I’m going to be building the application using laravel 5.2 I have 3 different types of users as follows Users Course Providers Advisors All of which have different information associated with them such as Users Table first_name last_name date_of_birth email password Course Providers – this needs to have multiple logins associated with the course provider company_name address_line_1 address_line_2 postcode tel Advisors company_name first_name last_name email password I still want to use laravels Auth but how can I allow multiple auths or am I best in using roles if so how would this work? What’s the best way of handling multiple logins that are associated with 1 company? I would appreciate if anyone can give me a better solution or point me in the right direction.
  5. Hi, I have a few wordpress websites that I host for my clients because of the number of attacks they have been receiving lately I have implemented a .htaccess file to block any ip address that's not in the whitelist, the problem I face is everytime the client moves from location to location or there ip address changes I have to update the .htaccess file with there new ip. I'm trying to build a script where they can access a url with a key in and submit there new ip address the php script would then read the .htaccess and add the new ip, however the 'echos' in the file seem not to be echoing any information to screen and I'm faced with a blank white screen can anyone give me any ideas on how to do this or have alook at the script below I have wrote. <?php if (isset($_GET('key')) && $_GET('key') = '78J89ke93k93HJ883j003') { $htaccess = '.htaccess'; //read the entire file $str = file_get_contents($htaccess); //delete deny from all from file $str = str_replace('deny from all', '', $str); $ip = 'allow from ' . $_get('ip'); //'allow from 92.27.111.112'; $str .= $ip; //re add deny from all to end of file $str .= "\n" . 'deny from all'; if(file_put_contents($htaccess, $str)){ echo 'IP ' . $ip . ' Added to .htaccess file'; } } else { echo 'Invalid Key'; } ?>
  6. That's not really the answer I was looking for
  7. Hi, I'm building an application that keeps track of stock of cars, I have cars table that contains details about that car but I have a photos table that contains id, car_id, photo. When your on the add a car section I want to be able to upload as many photos as I want but the problem is I'm unsure on how to program it. Do I query the database for the next auto id and then have an Ajax file upload that uploads them and adds to database that next car id? What about if the user decides to cancel half way though? My photos table will be left with reference to that id because it's not yet been added. Can some give me some ideas on how I should go about this?
  8. Hi Sean, that is the bit i want to fix BTW, why are you hard-coding the field name as 'first_name' for all errors? i want it the be the field name with the error but i dont know how to access the field name in laravel errors can you help?
  9. Hi where it says 'field' => 'first_name', I want that to be the field the error occured on and also the syntax is the laravel
  10. Hi, I am building a restfull service and i would like to out put a error like the following { "error": true, "message": "Validation failed", "code": 400, "errors": [ { "field": "first_name", "error": "The first name field is required." }, { "field": "first_name", "error": "The last name field is required." }, { "field": "first_name", "error": "The gender field is required." }, { "field": "first_name", "error": "The city id field is required." }, { "field": "first_name", "error": "The postcode field is required." }, { "field": "first_name", "error": "The email field is required." }, { "field": "first_name", "error": "The password field is required." } ] } but i cant seem to read the array key as what the vailidation failed on $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { $errors = array(); $messages = $validator->messages(); //print_r($messages); foreach ($messages->all() as $value) { $errors[] = array('field' => 'first_name', 'error' => $value ); } $response = Response::json(array( 'error' => true, 'message' => 'Validation failed', 'code' => 400, 'errors' => $errors ) ); //$validator->messages() return $response; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.